* 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:
parent
a823fc5d8b
commit
646988189a
@ -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>
|
Mon May 5 11:13:50 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* compile.c (compile_cpath): use Qundef to denote cbase lookup.
|
* compile.c (compile_cpath): use Qundef to denote cbase lookup.
|
||||||
|
2
array.c
2
array.c
@ -1229,9 +1229,9 @@ rb_ary_dup(VALUE ary)
|
|||||||
{
|
{
|
||||||
VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
|
VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
|
||||||
|
|
||||||
|
DUPSETUP(dup, ary);
|
||||||
MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
|
MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
|
||||||
RARRAY(dup)->len = RARRAY_LEN(ary);
|
RARRAY(dup)->len = RARRAY_LEN(ary);
|
||||||
OBJ_INFECT(dup, ary);
|
|
||||||
|
|
||||||
return dup;
|
return dup;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user