summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-13 13:19:27 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-13 13:19:27 (GMT)
commitf3c9ffe094ff8d57d040b9599556082664548838 (patch)
treea4a5939f86c3f7c93358c8617278282133b298de /hash.c
parentab22202a50397b24ee23e01b6f229b2893a28278 (diff)
hash.c: [DOC] fix for Hash#store docs
* hash.c (rb_hash_aset): fix misleading example which may suggest that Hash.store will return self instead of value - Hash#store is returning value and update itself, as well as Hash#[]=. [Fix GH-715] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 41e8ca4..9bfc396 100644
--- a/hash.c
+++ b/hash.c
@@ -1366,7 +1366,8 @@ 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}
+ * h.store("d", 42) #=> 42
+ * h #=> {"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).