summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-15 13:56:19 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-15 13:56:19 +0000
commit89cb510822affcb5f2d5d988092005610dd6ebe8 (patch)
treef636c4b1e89b5206799c0563f6ebe3cbf8fef5a0
parent64eeb5f3029e85e5edfefa0957547501b7417c12 (diff)
merge revision(s) 42555: [Backport #8911]
* hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick [Fixes GH-382] https://github.com/ruby/ruby/pull/382 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--hash.c17
-rw-r--r--version.h2
3 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a022ce51f..4d1161934d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Sep 15 22:55:44 2013 Zachary Scott <e@zzak.io>
+
+ * hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick
+ [Fixes GH-382] https://github.com/ruby/ruby/pull/382
+
Sun Sep 15 22:03:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
diff --git a/hash.c b/hash.c
index a06e7a352b..7e0059a309 100644
--- a/hash.c
+++ b/hash.c
@@ -1172,17 +1172,24 @@ static NOINSERT_UPDATE_CALLBACK(hash_aset_str)
* hsh[key] = value -> value
* hsh.store(key, value) -> value
*
- * Element Assignment---Associates the value given by
- * <i>value</i> with the key given by <i>key</i>.
- * <i>key</i> should not have its value changed while it is in
- * use as a key (a <code>String</code> passed as a key will be
- * duplicated and frozen).
+ * == Element Assignment
+ *
+ * Associates the value given by +value+ with the key given by +key+.
*
* h = { "a" => 100, "b" => 200 }
* h["a"] = 9
* h["c"] = 4
* h #=> {"a"=>9, "b"=>200, "c"=>4}
*
+ * +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).
+ *
+ * a = "a"
+ * b = "b".freeze
+ * h = { a => 100, b => 200 }
+ * h.key(100).equal? a #=> false
+ * h.key(200).equal? b #=> true
+ *
*/
VALUE
diff --git a/version.h b/version.h
index 8a4d03a19e..c36c1ee451 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2013-09-15"
-#define RUBY_PATCHLEVEL 314
+#define RUBY_PATCHLEVEL 315
#define RUBY_RELEASE_YEAR 2013
#define RUBY_RELEASE_MONTH 9