summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-27 12:17:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-27 12:17:36 +0000
commit731e45216ae4adf4122f0515d3056e1579efb0f9 (patch)
treee42b3e3ac61e2c104f7a1b4d72380e55ab918f6e /parse.y
parentc5e372ff277af2b69c785290389f638dbfef820d (diff)
* node.h (rb_args_info): change pre_args_num and post_args_num as
int, to match with rb_iseq_t. * parse.y (new_args_gen): check overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 100f5a0..8ee7cdb 100644
--- a/parse.y
+++ b/parse.y
@@ -9656,10 +9656,10 @@ new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE
args = ALLOC(struct rb_args_info);
- args->pre_args_num = m ? m->nd_plen : 0;
+ args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0;
args->pre_init = m ? m->nd_next : 0;
- args->post_args_num = p ? p->nd_plen : 0;
+ args->post_args_num = p ? rb_long2int(p->nd_plen) : 0;
args->post_init = p ? p->nd_next : 0;
args->first_post_arg = p ? p->nd_pid : 0;