1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2006-10-18 04:29:44 +00:00
parent d8b77db1ae
commit fd4b559c95
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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;