diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-07 09:38:12 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-07 09:38:12 +0000 |
| commit | 393e6c32cdd690bde28b0e0d5b58091667f9853b (patch) | |
| tree | a93c68953531459a12c4b023fa9d8cac89748fc3 /eval.c | |
| parent | 61fc0826f4850727d44916faeeb421abf5b8737f (diff) | |
| download | ruby-393e6c32cdd690bde28b0e0d5b58091667f9853b.tar.gz ruby-393e6c32cdd690bde28b0e0d5b58091667f9853b.tar.xz ruby-393e6c32cdd690bde28b0e0d5b58091667f9853b.zip | |
* eval.c (formal_assign): need to pack rest arg information in
argc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -5689,17 +5689,12 @@ formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_ } else { VALUE v; + int n = 1; - if (argc > 0) { - int n = 1; - v = rb_ary_new4(argc,argv); - n += npost; - i += n*256; - i = -i; - } - else { - v = rb_ary_new2(0); - } + v = rb_ary_new4(argc,argv); + n += npost; + i += n*256; + i = -i; assign(recv, node->nd_rest, v, 1); } return i; |
