1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_eval.c (rb_current_receiver): use GET_EC().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-10-29 14:39:51 +00:00
parent bcdb02c8f4
commit 01a935d478

View file

@ -244,10 +244,11 @@ rb_call_super(int argc, const VALUE *argv)
VALUE
rb_current_receiver(void)
{
rb_thread_t *th = GET_THREAD();
const rb_execution_context_t *ec = GET_EC();
rb_control_frame_t *cfp;
if (!th || !(cfp = th->ec->cfp))
if (!ec || !(cfp = ec->cfp)) {
rb_raise(rb_eRuntimeError, "no self, no life");
}
return cfp->self;
}