summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-06 07:00:19 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-06 07:00:19 +0000
commit9537e8ffe5b7a0e6a2a791e1886509dc98b6d3f9 (patch)
tree4dc30bb86d4131f70c137831c116771783e5fc5b /eval.c
parent3dd941b234ab6df52f72bb32e401f6669ef972c7 (diff)
* internal.h, class.c, eval.c, insns.def: find the appropriate
receiver for super called in instance_eval. If such a receiver is not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 7af64fc16c..099bf101a6 100644
--- a/eval.c
+++ b/eval.c
@@ -1055,10 +1055,12 @@ rb_overlay_module(NODE *cref, VALUE klass, VALUE module)
}
FL_SET(module, RMODULE_IS_OVERLAID);
c = iclass = rb_include_class_new(module, superclass);
+ RCLASS_REFINED_CLASS(c) = klass;
module = RCLASS_SUPER(module);
while (module) {
FL_SET(module, RMODULE_IS_OVERLAID);
c = RCLASS_SUPER(c) = rb_include_class_new(module, RCLASS_SUPER(c));
+ RCLASS_REFINED_CLASS(c) = klass;
module = RCLASS_SUPER(module);
}
rb_hash_aset(cref->nd_omod, klass, iclass);