mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use dup to preserve previous behavior
This commit is contained in:
@@ -11,7 +11,7 @@ module ActiveSupport
|
||||
end
|
||||
|
||||
def with_indifferent_access
|
||||
self
|
||||
dup
|
||||
end
|
||||
|
||||
def initialize(constructor = {})
|
||||
|
||||
@@ -971,7 +971,7 @@ class HashToXmlTest < Test::Unit::TestCase
|
||||
assert_nil hash_wia.default
|
||||
end
|
||||
|
||||
def test_should_return_self_for_with_indifferent_access
|
||||
def test_should_return_dup_for_with_indifferent_access
|
||||
hash_wia = HashWithIndifferentAccess.new
|
||||
assert_equal hash_wia, hash_wia.with_indifferent_access
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user