summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-08 03:11:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-08 03:11:35 +0000
commitbd872a544c1149bbc94d5b3b79066318683fbedd (patch)
treeefe7ecc353ddb1ebf1846b0fa653183755dcd048 /vm_eval.c
parentdaed91295479ff3e981bcc9e395721ba4057c79e (diff)
vm_eval.c: resolve refined method entry
* vm_eval.c (rb_method_call_status): resolve refined method entry to check if undefined. [ruby-core:69064] [Bug #11117] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vm_eval.c b/vm_eval.c
index f31a60a..95b1e8e 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -559,10 +559,14 @@ rb_method_call_status(rb_thread_t *th, const rb_method_entry_t *me, call_type sc
ID oid;
int noex;
- if (UNDEFINED_METHOD_ENTRY_P(me) ||
- UNDEFINED_REFINED_METHOD_P(me->def)) {
+ if (UNDEFINED_METHOD_ENTRY_P(me)) {
+ undefined:
return scope == CALL_VCALL ? NOEX_VCALL : 0;
}
+ if (me->def->type == VM_METHOD_TYPE_REFINED) {
+ me = rb_resolve_refined_method(Qnil, me, NULL);
+ if (UNDEFINED_METHOD_ENTRY_P(me)) goto undefined;
+ }
klass = me->klass;
oid = me->def->original_id;
noex = me->flag;