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

ruby-changes:29271

From: nagachika <ko1@a...>
Date: Sun, 16 Jun 2013 02:15:06 +0900 (JST)
Subject: [ruby-changes:29271] nagachika:r41323 (ruby_2_0_0): merge revision(s) 41245: [Backport #8513]

nagachika	2013-06-16 02:14:53 +0900 (Sun, 16 Jun 2013)

  New Revision: 41323

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

  Log:
    merge revision(s) 41245: [Backport #8513]
    
    * array.c (FL_SET_EMBED): shared object is frozen even when get
      unshared.
    
    * array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/array.c
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/array.c
===================================================================
--- ruby_2_0_0/array.c	(revision 41322)
+++ ruby_2_0_0/array.c	(revision 41323)
@@ -67,7 +67,6 @@ memfill(register VALUE *mem, register lo https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/array.c#L67
 #define ARY_OWNS_HEAP_P(a) (!FL_TEST((a), ELTS_SHARED|RARRAY_EMBED_FLAG))
 #define FL_SET_EMBED(a) do { \
     assert(!ARY_SHARED_P(a)); \
-    assert(!OBJ_FROZEN(a)); \
     FL_SET((a), RARRAY_EMBED_FLAG); \
 } while (0)
 #define FL_UNSET_EMBED(ary) FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK)
@@ -268,10 +267,10 @@ rb_ary_modify(VALUE ary) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/array.c#L267
         }
 	else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {
 	    long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);
+	    FL_UNSET_SHARED(ary);
 	    ARY_SET_PTR(ary, RARRAY_PTR(shared));
 	    ARY_SET_CAPA(ary, RARRAY_LEN(shared));
 	    MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+shift, VALUE, len);
-	    FL_UNSET_SHARED(ary);
 	    FL_SET_EMBED(shared);
 	    rb_ary_decrement_share(shared);
 	}
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 41322)
+++ ruby_2_0_0/ChangeLog	(revision 41323)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Jun 16 01:56:54 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* array.c (FL_SET_EMBED): shared object is frozen even when get
+	  unshared.
+
+	* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.
+
 Sun Jun 16 01:32:26 2013  TAKANO Mitsuhiro <tak@n...>
 
 	* insns.def: fix condition.
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 41322)
+++ ruby_2_0_0/version.h	(revision 41323)
@@ -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-06-16"
-#define RUBY_PATCHLEVEL 221
+#define RUBY_PATCHLEVEL 222
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 6

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


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

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