diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-26 13:16:18 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-26 13:16:18 +0000 |
commit | a48bb358ceb415ff822056f6bc73cb08e4baa0cb (patch) | |
tree | f3a2d58d52f1cacbae3aecc7cf891fd3c05aa971 /vm_method.c | |
parent | cee6ec3f4bc1b80cd61e7ed61363c8a886afa061 (diff) | |
download | ruby-a48bb358ceb415ff822056f6bc73cb08e4baa0cb.tar.gz |
* vm_method.c (rb_alias): should resolve refined methods.
[ruby-core:69360] [Bug #11182]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c index 1acd7226a2..e3d6b41a31 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1303,6 +1303,9 @@ rb_alias(VALUE klass, ID name, ID def) again: orig_me = search_method(klass, def, &defined_class); + if (orig_me && orig_me->def->type == VM_METHOD_TYPE_REFINED) { + orig_me = rb_resolve_refined_method(Qnil, orig_me, &defined_class); + } if (UNDEFINED_METHOD_ENTRY_P(orig_me) || UNDEFINED_REFINED_METHOD_P(orig_me->def)) { |