summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 13:15:26 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 13:15:26 +0000
commit8004ad33bcdb7b5bec3f7f077d386563fbcda76a (patch)
treeaa8388fa9bc7eda27578d67b4a7d85015f9b2f1d /vm_method.c
parentbbeeb2535c8e1b9759c14c9c441d654e2a1193e5 (diff)
* eval.c, method.h, proc.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c:
TracePoint#method_id should return method_id, not callee_id. [ruby-core:77241] [Feature #12747] * test/ruby/test_settracefunc.rb: change accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c
index 93f65495fc..33e90cf9f1 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -408,9 +408,9 @@ rb_method_entry_clone(const rb_method_entry_t *src_me)
}
const rb_callable_method_entry_t *
-rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, VALUE defined_class)
+rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class)
{
- rb_method_entry_t *me = rb_method_entry_alloc(src_me->called_id, src_me->owner, defined_class,
+ rb_method_entry_t *me = rb_method_entry_alloc(called_id, src_me->owner, defined_class,
method_definition_addref_complement(src_me->def));
METHOD_ENTRY_FLAGS_COPY(me, src_me);
METHOD_ENTRY_COMPLEMENTED_SET(me);
@@ -816,7 +816,7 @@ prepare_callable_method_entry(VALUE defined_class, ID id, const rb_method_entry_
VM_ASSERT(callable_method_entry_p(cme));
}
else {
- cme = rb_method_entry_complement_defined_class(me, defined_class);
+ cme = rb_method_entry_complement_defined_class(me, me->called_id, defined_class);
rb_id_table_insert(mtbl, id, (VALUE)cme);
VM_ASSERT(callable_method_entry_p(cme));
}
@@ -949,7 +949,7 @@ rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_e
const rb_method_entry_t *resolved_me = resolve_refined_method(refinements, (const rb_method_entry_t *)me, &defined_class);
if (resolved_me && resolved_me->defined_class == 0) {
- return rb_method_entry_complement_defined_class(resolved_me, defined_class);
+ return rb_method_entry_complement_defined_class(resolved_me, me->called_id, defined_class);
}
else {
return (const rb_callable_method_entry_t *)resolved_me;