diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-11 00:08:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-11 00:08:41 +0000 |
commit | 07792fe7587d93d26dbc42139f04929b2d48163e (patch) | |
tree | 552c63813ebb16fc403e9dd1f7098dece9e07a37 /vm_eval.c | |
parent | a71ecb74da1a2743deac37d48084dc45f09cb7d1 (diff) | |
download | ruby-07792fe7587d93d26dbc42139f04929b2d48163e.tar.gz |
vm_eval.c: reorder
* vm_eval.c (vm_call0_body): reorder the conditions.
[ruby-core:78073] [Bug #12920]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -196,15 +196,13 @@ vm_call0_body(rb_thread_t* th, struct rb_calling_info *calling, const struct rb_ const rb_method_type_t type = cc->me->def->type; VALUE super_class = cc->me->defined_class; - if (type == VM_METHOD_TYPE_REFINED) { - if (cc->me->def->body.refined.orig_me) { - cc->me = refined_method_callable_without_refinement(cc->me); - goto again; - } - } - else { + if (type == VM_METHOD_TYPE_ZSUPER) { super_class = RCLASS_ORIGIN(super_class); } + else if (cc->me->def->body.refined.orig_me) { + cc->me = refined_method_callable_without_refinement(cc->me); + goto again; + } super_class = RCLASS_SUPER(super_class); |