diff --git a/ChangeLog b/ChangeLog index 7705b7062f..c39fdb2198 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue May 4 22:59:48 2010 wanabe + + * compile.c (iseq_build_body): update iseq->ic_size. + a patch from Tomoyuki Chikanaga. see #3236. + Tue May 4 18:51:22 2010 Nobuyoshi Nakada * error.c (name_err_mesg_to_str): preserve encoding of inspection. diff --git a/compile.c b/compile.c index f1a04feaba..f3e43fc3b7 100644 --- a/compile.c +++ b/compile.c @@ -5269,6 +5269,8 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor, break; case TS_IC: argv[j] = op; + if (NUM2INT(op) >= iseq->ic_size) + iseq->ic_size = NUM2INT(op) + 1; break; case TS_ID: argv[j] = rb_convert_type(op, T_SYMBOL,