mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
class.c: exclude original module
* class.c (rb_mod_included_modules): should not include the original module itself. [ruby-core:53158] [Bug #8025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6359460610
commit
3fd0000c0c
3 changed files with 14 additions and 1 deletions
|
@ -1548,6 +1548,13 @@ class TestModule < Test::Unit::TestCase
|
|||
assert_nothing_raised(NoMethodError, bug8005) {a.send :foo}
|
||||
end
|
||||
|
||||
def test_prepend_included_modules
|
||||
bug8025 = '[ruby-core:53158] [Bug #8025]'
|
||||
mixin = labeled_module("mixin")
|
||||
c = labeled_module("c") {prepend mixin}
|
||||
assert_not_include(c.included_modules, c, bug8025)
|
||||
end
|
||||
|
||||
def test_class_variables
|
||||
m = Module.new
|
||||
m.class_variable_set(:@@foo, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue