summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-13 01:43:49 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-13 01:43:49 +0000
commit078ae7dd8054b09fd576ddaf019e39e1042770d0 (patch)
tree86c590014f646859365fe51b273bde565b38a2ed /hash.c
parent4aaa510fde82d186474195abb645e659fcfd6228 (diff)
* 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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 4a0838c04d..bcd087aec3 100644
--- a/hash.c
+++ b/hash.c
@@ -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).