This project is archived and is in readonly mode.

#2615 ✓committed
Pete Yandell

[Patch] Fixes OrderedHash.[] constructs a broken hash

Reported by Pete Yandell | May 7th, 2009 @ 08:53 AM | in 2.x


>> Hash[1, 2, 3, 4]
=> {1=>2, 3=>4}
>> Hash[1, 2, 3, 4].keys
=> [1, 3]
>> ActiveSupport::OrderedHash[1, 2, 3, 4]
=> #<OrderedHash {1=>2, 3=>4}>
>> ActiveSupport::OrderedHash[1, 2, 3, 4].keys
TypeError: can't dup NilClass
	from /usr/local/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/activesupport-2.3.1/lib/active_support/ordered_hash.rb:49:in `dup'
	from /usr/local/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/activesupport-2.3.1/lib/active_support/ordered_hash.rb:49:in `keys'
	from (irb):4
>> 

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments