This project is archived and is in readonly mode.

#5775 ✓resolved
greg (at araelium)

HashWithIndifferentAccess should override #store

Reported by greg (at araelium) | October 9th, 2010 @ 05:41 PM | in 3.0.2

params[:save_me]=x and params['save_me']=x are equivalent.

params.store(:save_me, x) and params.store('save_me', x) are not equivalent.

params.store(:test1, 1)
params.store('test1', 11)
params[:test2] = 2
params['test2'] = 22

Results in:

--- !map:ActiveSupport::HashWithIndifferentAccess
test1: 11
:test1: 1
test2: 22

When I am expecting

--- !map:ActiveSupport::HashWithIndifferentAccess 
test1: 11
test2: 22

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>

Referenced by

Pages