This project is archived and is in readonly mode.

#4702 ✓duplicate
Georg Ledermann

Rails 2.3.8: Hash#deep_merge fails for HashWithIndifferentAccess

Reported by Georg Ledermann | May 26th, 2010 @ 08:11 AM | in 2.3.9

The following test fails with Rails 2.3.8

class HashTest < ActiveSupport::TestCase
  def test_deep_merge_for_hash_with_indifferent_access
    hash1 = { :k => { :v1 => 1 } }.with_indifferent_access
    hash2 = { :k => { :v2 => 2 } }

    assert_equal({ "k" => { "v1" => 1, "v2" => 2 } }, hash1.deep_merge(hash2))
  end 
end

Seems to be similar to #2732

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>

Pages