From fd4b559c95d4b3c36b4ab1724f6d7e9cf61d72b0 Mon Sep 17 00:00:00 2001 From: matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Wed, 18 Oct 2006 04:29:44 +0000 Subject: [PATCH] * array.c (ary_shared_array): should set NOEMBED flag for a copied array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ array.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 984b11f878..693f64bab4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,11 @@ Tue Oct 17 22:03:08 2006 Minero Aoki <aamine@loveruby.net> * lib/erb.rb: String#each was removed, use #each_line instead. +Tue Oct 17 12:27:32 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * array.c (ary_shared_array): should set NOEMBED flag for a copied + array. + Tue Oct 17 08:04:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * string.c (rb_str_lines): now takes optional argument for the diff --git a/array.c b/array.c index 166868452f..458310a69b 100644 --- a/array.c +++ b/array.c @@ -486,6 +486,7 @@ ary_shared_array(VALUE klass, VALUE ary) VALUE val = ary_alloc(klass); ary_make_shared(ary); + ARY_SET_NOEMBED(val); RARRAY(val)->as.heap.ptr = RARRAY(ary)->as.heap.ptr; RARRAY(val)->as.heap.len = RARRAY(ary)->as.heap.len; RARRAY(val)->as.heap.aux.shared = RARRAY(ary)->as.heap.aux.shared;