summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-24 02:07:05 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-24 02:07:05 +0000
commit0fe72040e4c278bfafe232dc44551de2dfac85e2 (patch)
treeb94399addca7cc57efeb4ae755c408a09d99d115 /iseq.c
parentc5148e038316b3351b4c831773b83e08c11c20fb (diff)
downloadruby-0fe72040e4c278bfafe232dc44551de2dfac85e2.tar.gz
* parse.y, node.h, compile.c: change node tree structure. a purpose
of this change is to unify argument structure of method and block. this change prohibits duplicate block parameter name. new argument infromation: NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] NODE_ARGS_AUX [r: ID, b: ID, ->] NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] optarg information: NODE_OPT_ARGS [idx, expr, ->] * vm_macro.def: ditto. * gc.c: ditto. * iseq.c: ditto. * compile.h: fix debug function name. * test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo| * test/ruby/test_lambda.rb: disalbe test temporarily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/iseq.c b/iseq.c
index 1680aa4aa5..1fc0cff963 100644
--- a/iseq.c
+++ b/iseq.c
@@ -542,10 +542,15 @@ insn_operand_intern(rb_iseq_t *iseq,
case TS_LINDEX:
{
rb_iseq_t *ip = iseq->local_iseq;
+ int lidx = ip->local_size - op + 1;
+ ID id = ip->local_tbl[lidx];
- ret =
- rb_str_new2(
- rb_id2name(ip->local_tbl[ip->local_size - op + 1]));
+ if (id) {
+ ret = rb_str_new2(rb_id2name(id));
+ }
+ else {
+ ret = rb_str_new2("*");
+ }
break;
}
case TS_DINDEX:{