* 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
Родитель d8b77db1ae
Коммит fd4b559c95
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

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

Просмотреть файл

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