mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
class.c: include modules only
* class.c (rb_mod_included_modules): should not include non-modules. [ruby-core:53158] [Bug #8025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3fd0000c0c
commit
e8bdef657a
3 changed files with 17 additions and 2 deletions
|
@ -1552,7 +1552,15 @@ class TestModule < Test::Unit::TestCase
|
|||
bug8025 = '[ruby-core:53158] [Bug #8025]'
|
||||
mixin = labeled_module("mixin")
|
||||
c = labeled_module("c") {prepend mixin}
|
||||
assert_not_include(c.included_modules, c, bug8025)
|
||||
im = c.included_modules
|
||||
assert_not_include(im, c, bug8025)
|
||||
assert_include(im, mixin, bug8025)
|
||||
c1 = labeled_class("c1") {prepend mixin}
|
||||
c2 = labeled_class("c2", c1)
|
||||
im = c2.included_modules
|
||||
assert_not_include(im, c1, bug8025)
|
||||
assert_not_include(im, c2, bug8025)
|
||||
assert_include(im, mixin, bug8025)
|
||||
end
|
||||
|
||||
def test_class_variables
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue