diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-03 19:44:42 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-03 19:44:42 +0000 |
commit | 8ff3a728aea4fb52342839dcfcae6350d6d9a6ec (patch) | |
tree | 60d9615c9fd7013a8cdc09598b9fe99913b614bf /vm_eval.c | |
parent | 306ed7c0d0fe25acf077e541f1c15e4f93f2ed6a (diff) |
merge revision(s) 50430,50440: [Backport #11117]
* vm_eval.c (rb_method_call_status): undefined refined method is
not callable unless using. [ruby-core:69064] [Bug #11117]
* 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/branches/ruby_2_2@51133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -557,8 +557,13 @@ rb_method_call_status(rb_thread_t *th, const rb_method_entry_t *me, call_type sc int noex; 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; |