This project is archived and is in readonly mode.
OrderedHash .to_hash and .sort
-
CancelProfileIsBroken
- Assigned user set to Jeremy Kemper
- Milestone cleared.
Partially fixed in http://github.com/rails/rails/co... but
(a) The change to to_hash introduced
SystemStackError: stack level too deep
into inspect
(b) Sort still behaves differently than it did in 2.2.2.
HOWEVER - the original 2.3.0 behavior under ruby 1.8 is consistent with the way OrderedHash behaves in 1.9:
irb(main):001:0> h = Hash.new => {} irb(main):002:0> h[:one] = :two => :two irb(main):003:0> h.keys => [:one] irb(main):004:0> h.sort => [[:one, :two]] irb(main):005:0> h.sort.keys NoMethodError: undefined method `keys' for [[:one, :two]]:Array from (irb):5 from /Users/mike/.rubies/1.9.T/bin/irb:12:in `<main>' irb(main):006:0> h.sort.class => ArrayProbably the commit should just be reverted and the 2.2.2 behavior considered a bug.
-
Jeremy Kemper
- State changed from new to resolved