summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-01 17:28:47 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-01 17:28:47 +0000
commit663613a993cc51d5c5e89e9d31b587d1f5688be8 (patch)
treed76039993adeade66064bc95cb0a7d2e3290b1a8
parent98b1b387f293df232d4cb70857a46d3cb71854e9 (diff)
* hash.c (rb_hash_update): Revert documentation from r38672
See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--hash.c13
2 files changed, 5 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index da2e411..c74656e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 02 02:29:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * hash.c (rb_hash_update): Revert documentation from r38672
+ See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013
+
Wed Jan 02 02:16:00 2012 Zachary Scott <zachary@zacharyscott.net>
* hash.c (rb_hash_update): Documentation for Hash#merge and shallow
diff --git a/hash.c b/hash.c
index 976a57e..df0adb1 100644
--- a/hash.c
+++ b/hash.c
@@ -1893,19 +1893,6 @@ rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
* h2 = { "b" => 254, "c" => 300 }
* h1.merge!(h2) { |key, v1, v2| v1 }
* #=> {"a"=>100, "b"=>200, "c"=>300}
- *
- * Note that this method creates a shallow copy of the value in _other_hash_.
- * This means that when for example Array#select! is used on one of the values
- * in _other_hash_ both the original object as well as the copy will be
- * modified. This is illustrated in the following example:
- *
- * original = { "numbers" => [10, 20, 30] }
- * copy = {}.merge(original)
- *
- * copy["numbers"].select! { |number| number <= 20 }
- *
- * puts copy # => { "numbers" => [10, 20] }
- * puts original # => { "numbers" => [10, 20] }
*/
static VALUE