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?
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.
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?
Cheers
Ivan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.