summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-14 11:23:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-14 11:23:10 +0000
commit0f36e8fc03a5c6433972d6bb5f177d5f6e106bac (patch)
tree1eb8130db6c5693bd7a57935b7f49b74ba53aa82 /eval.c
parente53a46a58b76fc8c8f43fb0cc389948e77be44ff (diff)
* 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
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
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("<ifunc>");
}
if (iseq->defined_method_id) {