Skip to content

Commit 1ef4fec

Browse files
committed
merge revision(s) 41245: [Backport ruby#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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent e598998 commit 1ef4fec

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Sun Jun 16 01:56:54 2013 Nobuyoshi Nakada <[email protected]>
2+
3+
* array.c (FL_SET_EMBED): shared object is frozen even when get
4+
unshared.
5+
6+
* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.
7+
18
Sun Jun 16 01:32:26 2013 TAKANO Mitsuhiro <[email protected]>
29

310
* insns.def: fix condition.

array.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ memfill(register VALUE *mem, register long size, register VALUE val)
6767
#define ARY_OWNS_HEAP_P(a) (!FL_TEST((a), ELTS_SHARED|RARRAY_EMBED_FLAG))
6868
#define FL_SET_EMBED(a) do { \
6969
assert(!ARY_SHARED_P(a)); \
70-
assert(!OBJ_FROZEN(a)); \
7170
FL_SET((a), RARRAY_EMBED_FLAG); \
7271
} while (0)
7372
#define FL_UNSET_EMBED(ary) FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK)
@@ -268,10 +267,10 @@ rb_ary_modify(VALUE ary)
268267
}
269268
else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {
270269
long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);
270+
FL_UNSET_SHARED(ary);
271271
ARY_SET_PTR(ary, RARRAY_PTR(shared));
272272
ARY_SET_CAPA(ary, RARRAY_LEN(shared));
273273
MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+shift, VALUE, len);
274-
FL_UNSET_SHARED(ary);
275274
FL_SET_EMBED(shared);
276275
rb_ary_decrement_share(shared);
277276
}

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.0.0"
22
#define RUBY_RELEASE_DATE "2013-06-16"
3-
#define RUBY_PATCHLEVEL 221
3+
#define RUBY_PATCHLEVEL 222
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 6

0 commit comments

Comments
 (0)