ruby-changes:38979
From: shugo <ko1@a...>
Date: Mon, 29 Jun 2015 14:53:00 +0900 (JST)
Subject: [ruby-changes:38979] shugo:r51060 (trunk): * eval.c (add_activated_refinement): should not include the original
shugo 2015-06-29 14:52:38 +0900 (Mon, 29 Jun 2015) New Revision: 51060 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51060 Log: * eval.c (add_activated_refinement): should not include the original class. Modified files: trunk/ChangeLog trunk/eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 51059) +++ ChangeLog (revision 51060) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jun 29 14:50:08 2015 Shugo Maeda <shugo@r...> + + * eval.c (add_activated_refinement): should not include the original + class. + Mon Jun 29 12:09:10 2015 SHIBATA Hiroshi <hsbt@r...> * README.md: tweak styles. [fix GH-945][ci skip] Patch by @bryndyment Index: eval.c =================================================================== --- eval.c (revision 51059) +++ eval.c (revision 51060) @@ -1274,7 +1274,7 @@ add_activated_refinement(VALUE activated https://github.com/ruby/ruby/blob/trunk/eval.c#L1274 c = iclass = rb_include_class_new(refinement, superclass); RCLASS_REFINED_CLASS(c) = klass; refinement = RCLASS_SUPER(refinement); - while (refinement) { + while (refinement && refinement != klass) { FL_SET(refinement, RMODULE_IS_OVERLAID); c = RCLASS_SET_SUPER(c, rb_include_class_new(refinement, RCLASS_SUPER(c))); RCLASS_REFINED_CLASS(c) = klass; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/