From 9537e8ffe5b7a0e6a2a791e1886509dc98b6d3f9 Mon Sep 17 00:00:00 2001 From: shugo Date: Mon, 6 Aug 2012 07:00:19 +0000 Subject: * 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 --- eval.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'eval.c') 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); -- cgit v1.2.3