Skip to content

Commit b73dd62

Browse files
committed
Merge pull request rails#15446 from akshay-vishnoi/doc_changes
[ci skip] Correct documentation of HashWithIndifferentAccess#dup
2 parents 7c63947 + 775a13c commit b73dd62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activesupport/lib/active_support/hash_with_indifferent_access.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def values_at(*indices)
182182
# dup = hash.dup
183183
# dup[:a][:c] = 'c'
184184
#
185-
# hash[:a][:c] #=> "c"
186-
# dup[:a][:c] #=> "c"
185+
# hash[:a][:c] # => nil
186+
# dup[:a][:c] # => "c"
187187
def dup
188188
self.class.new(self).tap do |new_hash|
189189
new_hash.default = default

0 commit comments

Comments
 (0)