summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-30 10:10:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-30 10:10:32 +0000
commite10bc03520f85364db117a0e40efd1b8ef6e271c (patch)
treee388e3bb0a0e9ea3ab4203b5761f43b2cda987c3 /vm_eval.c
parent0f34ff4614965a52dbaaff7456300b0a69db16ec (diff)
vm_eval.c: fix NoMethodError message
* vm_eval.c (vm_call0_body): fix NoMethodError message for refined method entry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index b5e72e64c0..9ed7a39ab2 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -188,6 +188,7 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
case VM_METHOD_TYPE_ZSUPER:
case VM_METHOD_TYPE_REFINED:
{
+ int ex = ci->me->def->type == VM_METHOD_TYPE_ZSUPER ? NOEX_SUPER : 0;
if (ci->me->def->type == VM_METHOD_TYPE_REFINED &&
ci->me->def->body.orig_me) {
ci->me = ci->me->def->body.orig_me;
@@ -197,7 +198,7 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
ci->defined_class = RCLASS_SUPER(ci->defined_class);
if (!ci->defined_class || !(ci->me = rb_method_entry(ci->defined_class, ci->mid, &ci->defined_class))) {
- ret = method_missing(ci->recv, ci->mid, ci->argc, argv, NOEX_SUPER);
+ ret = method_missing(ci->recv, ci->mid, ci->argc, argv, ex);
goto success;
}
RUBY_VM_CHECK_INTS(th);