ruby-changes:31580
From: zzak <ko1@a...>
Date: Wed, 13 Nov 2013 10:43:56 +0900 (JST)
Subject: [ruby-changes:31580] zzak:r43659 (trunk): * hash.c: [DOC] Adds an example for Hash#store
zzak 2013-11-13 10:43:49 +0900 (Wed, 13 Nov 2013) New Revision: 43659 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43659 Log: * hash.c: [DOC] Adds an example for Hash#store Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 43658) +++ ChangeLog (revision 43659) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Nov 13 10:43:19 2013 Zachary Scott <e@z...> + + * hash.c: [DOC] Adds an example for Hash#store + Wed Nov 13 09:03:40 2013 Zachary Scott <e@z...> * doc/regexp.rdoc: [DOC] add note about Bug #4044 as suggested by Index: hash.c =================================================================== --- hash.c (revision 43658) +++ hash.c (revision 43659) @@ -1266,6 +1266,7 @@ static NOINSERT_UPDATE_CALLBACK(hash_ase https://github.com/ruby/ruby/blob/trunk/hash.c#L1266 * 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). -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/