[前][次][番号順一覧][スレッド一覧]

ruby-changes:30866

From: nagachika <ko1@a...>
Date: Sun, 15 Sep 2013 22:56:25 +0900 (JST)
Subject: [ruby-changes:30866] nagachika:r42945 (ruby_2_0_0): merge revision(s) 42555: [Backport #8911]

nagachika	2013-09-15 22:56:19 +0900 (Sun, 15 Sep 2013)

  New Revision: 42945

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42945

  Log:
    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

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/hash.c
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 42944)
+++ ruby_2_0_0/ChangeLog	(revision 42945)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Sep 15 22:55:44 2013  Zachary Scott  <e@z...>
+
+	* 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@r...>
 
 	* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
Index: ruby_2_0_0/hash.c
===================================================================
--- ruby_2_0_0/hash.c	(revision 42944)
+++ ruby_2_0_0/hash.c	(revision 42945)
@@ -1172,17 +1172,24 @@ static NOINSERT_UPDATE_CALLBACK(hash_ase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/hash.c#L1172
  *     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
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 42944)
+++ ruby_2_0_0/version.h	(revision 42945)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #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

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r42555


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]