Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveSupport::OrderedHash::[] does not work identically to ::Hash::[] in ruby 1.8.7

#2832

ActiveSupport::OrderedHash::[] does not work identically to ::Hash::[] in ruby 1.8.7. There are two cases where OrderedHash::[] differs from the ruby implementation of Hash::[].

  1. OrderedHash::[] does not properly initialize the hash when it receives an array of arrays containing the key value pairs.

  2. OrderedHash::[] does not raise an ArgumentError when it receives an odd number of arguments.

Attached is a patch that addresses these issues.

Reported by brewski · June 24th, 2009 @ 07:09 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none