From 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 14 Jul 2010 11:23:10 +0000 Subject: * eval.c (frame_func_id), vm_eval.c (rb_iterate), vm_insnhelper.c (vm_yield_with_cfunc): as the name of a C-level block, use the current method ID at the creation point. [ruby-dev:41852] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 95d1b8c860..25969217ca 100644 --- a/eval.c +++ b/eval.c @@ -756,10 +756,13 @@ frame_func_id(rb_control_frame_t *cfp) { rb_iseq_t *iseq = cfp->iseq; if (!iseq) { + if (!cfp->me) return 0; return cfp->me->def->original_id; } while (iseq) { if (RUBY_VM_IFUNC_P(iseq)) { + NODE *ifunc = (NODE *)iseq; + if (ifunc->nd_aid) return ifunc->nd_aid; return rb_intern(""); } if (iseq->defined_method_id) { -- cgit v1.2.3