mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (massign): removed awkward conversion between yvalue,
mvalue, etc. * eval.c (rb_yield_0): new parameter added to tell whether val is an array value or not. * parse.y (yield_args): restructuring: new nodes: NODE_RESTARY2, NODE_SVALUE; removed node: NODE_RESTARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0082edfd3d
commit
b6c63738b2
1 changed files with 1 additions and 2 deletions
3
array.c
3
array.c
|
@ -631,7 +631,6 @@ VALUE
|
|||
rb_ary_to_ary(obj)
|
||||
VALUE obj;
|
||||
{
|
||||
if (NIL_P(obj)) return rb_ary_new2(0);
|
||||
if (TYPE(obj) == T_ARRAY) {
|
||||
return obj;
|
||||
}
|
||||
|
@ -649,7 +648,7 @@ rb_ary_update(ary, beg, len, rpl)
|
|||
{
|
||||
long rlen;
|
||||
|
||||
rpl = rb_ary_to_ary(rpl);
|
||||
rpl = (NIL_P(rpl)) ? rb_ary_new2(0) : rb_ary_to_ary(rpl);
|
||||
rlen = RARRAY(rpl)->len;
|
||||
|
||||
if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
|
||||
|
|
Loading…
Add table
Reference in a new issue