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 | bd580c48556e509aee516e1fc051fd6044650f2c (patch) | |
tree | a93c68953531459a12c4b023fa9d8cac89748fc3 | |
parent | ce99fd222e6dca8482cb2dba0956d6061afd6763 (diff) |
* eval.c (formal_assign): need to pack rest arg information in
argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 15 |
2 files changed, 10 insertions, 10 deletions
@@ -1,3 +1,8 @@ +Tue Nov 7 18:35:18 2006 Yukihiro Matsumoto <[email protected]> + + * eval.c (formal_assign): need to pack rest arg information in + argc. + Tue Nov 7 18:05:01 2006 Hidetoshi NAGAI <[email protected]> * ext/tk/lib/tk/itemconfig.rb: minor bug fix. @@ -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; |