aboutsummaryrefslogtreecommitdiffstats
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-06 01:31:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-06 01:31:03 +0000
commit3e557a979ecc2c9a43ffa3bbdb8fc2a6c5cfca61 (patch)
treed55326333b9d38bc86e72cf7a0de337522f85921 /vm_eval.c
parentb81950f480df1c07f2e6f271d23d066dafdc0e1f (diff)
downloadruby-3e557a979ecc2c9a43ffa3bbdb8fc2a6c5cfca61.tar.gz
vm_eval.c: next super class from the original
* vm_eval.c (vm_call_super): search next super class from the original class, to get rid of infinite recursion with prepending. a patch by Seiei Higa <hanachin AT gmail.com> at [ruby-core:68434]. [ruby-core:68093] [Bug #10847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49867 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 6eeee5f02e..4039b6c9f2 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -273,7 +273,8 @@ vm_call_super(rb_thread_t *th, int argc, const VALUE *argv)
rb_bug("vm_call_super: should not be reached");
}
- klass = RCLASS_SUPER(cfp->klass);
+ klass = RCLASS_ORIGIN(cfp->klass);
+ klass = RCLASS_SUPER(klass);
id = cfp->me->def->original_id;
me = rb_method_entry(klass, id, &klass);
if (!me) {