diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/indifferent_access.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb index 7d54c9fae6..6c7e876fca 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -4,8 +4,7 @@ class Hash # Returns an <tt>ActiveSupport::HashWithIndifferentAccess</tt> out of its receiver: # - # {:a => 1}.with_indifferent_access["a"] # => 1 - # + # { a: 1 }.with_indifferent_access['a'] # => 1 def with_indifferent_access ActiveSupport::HashWithIndifferentAccess.new_from_hash_copying_default(self) end @@ -17,8 +16,7 @@ class Hash # converting to an <tt>ActiveSupport::HashWithIndifferentAccess</tt> would not be # desirable. # - # b = {:b => 1} - # {:a => b}.with_indifferent_access["a"] # calls b.nested_under_indifferent_access - # + # b = { b: 1 } + # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access alias nested_under_indifferent_access with_indifferent_access end |