[Ironruby-core] sorting of strings is different in IronRuby than in Ruby
curth at microsoft.com
Wed Aug 20 19:27:15 EDT 2008
We end up calling String.CompareTo which performs a lexicographical comparison. This is the source of the different behavior. This should be filed as a bug in RubyForge if it hasn’t been already.
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Wednesday, August 20, 2008 12:54 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] sorting of strings is different in IronRuby than in Ruby
I was playing around with a very simple code example and got different results in IronRuby and in Ruby.
"IronRuby In Action".split(//).sort.uniq.join
returns in MRI: " AIRbcinortuy"
returns in IronRuby: " AbciInorRtuy"
I'm sure you guys are aware of this, but just in case :)
I guess in the end the 2 results should be the same or is this perhaps something that has to do with encoding?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core