diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-28 11:45:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-28 11:45:21 +0000 |
commit | 2a4c87dc31b3774b8f8f2ab7b74f6d864f41a804 (patch) | |
tree | 7ebced0774e05f5a00f78f93d94e15c5d7b202e1 /proc.c | |
parent | 2210709b79222ecd2d9758f7316fdbd7c068ea84 (diff) |
Add refinements support to method/instance_method.
[Fix GH-2034]
From: manga_osyo <[email protected]>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1413,7 +1413,7 @@ mnew_internal(const rb_method_entry_t *me, VALUE klass, VALUE iclass, if (me->defined_class) { VALUE klass = RCLASS_SUPER(RCLASS_ORIGIN(me->defined_class)); id = me->def->original_id; - me = (rb_method_entry_t *)rb_callable_method_entry_without_refinements(klass, id, &iclass); + me = (rb_method_entry_t *)rb_callable_method_entry_with_refinements(klass, id, &iclass); } else { VALUE klass = RCLASS_SUPER(me->owner); @@ -1448,10 +1448,10 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope) VALUE iclass = Qnil; if (obj == Qundef) { /* UnboundMethod */ - me = rb_method_entry_without_refinements(klass, id, &iclass); + me = rb_method_entry_with_refinements(klass, id, &iclass); } else { - me = (rb_method_entry_t *)rb_callable_method_entry_without_refinements(klass, id, &iclass); + me = (rb_method_entry_t *)rb_callable_method_entry_with_refinements(klass, id, &iclass); } return mnew_from_me(me, klass, iclass, obj, id, mclass, scope); } @@ -2766,7 +2766,7 @@ method_super_method(VALUE method) super_class = RCLASS_SUPER(RCLASS_ORIGIN(iclass)); mid = data->me->called_id; if (!super_class) return Qnil; - me = (rb_method_entry_t *)rb_callable_method_entry_without_refinements(super_class, mid, &iclass); + me = (rb_method_entry_t *)rb_callable_method_entry_with_refinements(super_class, mid, &iclass); if (!me) return Qnil; return mnew_internal(me, me->owner, iclass, data->recv, mid, rb_obj_class(method), FALSE, FALSE); } |