mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
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
This commit is contained in:
parent
d252e224f6
commit
a974041b0e
3 changed files with 14 additions and 5 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue