summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 14:39:51 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 14:39:51 +0000
commit01a935d478d67235ac3e243580150ae83a2dd6b6 (patch)
tree3fdd91c4857abe63f98dd882e17ac8dc1c4219e3 /vm_eval.c
parentbcdb02c8f46db3266d985eef906e8cdaa2bf31e7 (diff)
* 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
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 4ab9238..3186003 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -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;
}