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

* array.c (rb_ary_dup): should dupe corresponding information.

[ruby-dev:34581]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-05-05 02:40:13 +00:00
parent a823fc5d8b
commit 646988189a
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Mon May 5 11:36:14 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_dup): should dupe corresponding information.
[ruby-dev:34581]
Mon May 5 11:13:50 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* compile.c (compile_cpath): use Qundef to denote cbase lookup.

View file

@ -1229,9 +1229,9 @@ rb_ary_dup(VALUE ary)
{
VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
DUPSETUP(dup, ary);
MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
RARRAY(dup)->len = RARRAY_LEN(ary);
OBJ_INFECT(dup, ary);
return dup;
}