This project is archived and is in readonly mode.

#2832 ✓resolved
brewski

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

Reported by brewski | June 24th, 2009 @ 07:09 PM | in 2.x

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.

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>

People watching this ticket

Attachments

Referenced by

Pages