diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-14 11:23:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-14 11:23:10 +0000 |
commit | 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac (patch) | |
tree | 1eb8130db6c5693bd7a57935b7f49b74ba53aa82 /eval.c | |
parent | e53a46a58b76fc8c8f43fb0cc389948e77be44ff (diff) | |
download | ruby-0f36e8fc03a5c6433972d6bb5f177d5f6e106bac.tar.gz |
* 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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |