summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-29 05:52:38 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-29 05:52:38 +0000
commit8803c6016fa211b40d63bc1a7e6ffa32ac4a75c4 (patch)
tree3352639c61606106f91d47aacf8d1d0e505415de
parent6cb284a2cf00ff9f849c6300f65e006a9530d17a (diff)
* eval.c (add_activated_refinement): should not include the original
class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 70e15d1..1d546a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 29 14:50:08 2015 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (add_activated_refinement): should not include the original
+ class.
+
Mon Jun 29 12:09:10 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* README.md: tweak styles. [fix GH-945][ci skip] Patch by @bryndyment
diff --git a/eval.c b/eval.c
index c3c9383..3cc9a2e 100644
--- a/eval.c
+++ b/eval.c
@@ -1274,7 +1274,7 @@ add_activated_refinement(VALUE activated_refinements,
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;