From a974041b0ef744c102b2b15ff30b91b4b0ea8a1c Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 30 Dec 2015 00:58:58 +0000 Subject: object.c: fix prepend cmp * object.c (rb_class_inherited_p): search the corresponding ancestor to prepended module from prepending class itself. [ruby-core:72493] [Bug #11878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_module.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 55678e42a8..6b7c0da4a2 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1566,6 +1566,12 @@ class TestModule < Test::Unit::TestCase end end + def test_prepend_CMP + bug11878 = '[ruby-core:72493] [Bug #11878]' + assert_equal(-1, C1 <=> M2) + assert_equal(+1, M2 <=> C1, bug11878) + end + def test_prepend_inheritance bug6654 = '[ruby-core:45914]' a = labeled_module("a") -- cgit v1.2.3