1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* hash.c: [DOC] Adds an example for Hash#store

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-11-13 01:43:49 +00:00
parent 4aaa510fde
commit 078ae7dd80
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Nov 13 10:43:19 2013 Zachary Scott <e@zzak.io>
* hash.c: [DOC] Adds an example for Hash#store
Wed Nov 13 09:03:40 2013 Zachary Scott <e@zzak.io>
* doc/regexp.rdoc: [DOC] add note about Bug #4044 as suggested by

1
hash.c
View file

@ -1266,6 +1266,7 @@ static NOINSERT_UPDATE_CALLBACK(hash_aset_str)
* h["a"] = 9
* h["c"] = 4
* h #=> {"a"=>9, "b"=>200, "c"=>4}
* h.store("d", 42) #=> {"a"=>9, "b"=>200, "c"=>4, "d"=>42}
*
* +key+ should not have its value changed while it is in use as a key (an
* <tt>unfrozen String</tt> passed as a key will be duplicated and frozen).