summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 429fab897e..be23b84c46 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -449,7 +449,9 @@ class TestModule < Test::Unit::TestCase
class Bug18185 < Module
module InstanceMethods
end
+ attr_reader :ancestor_list
def initialize
+ @ancestor_list = ancestors
include InstanceMethods
end
class Foo
@@ -470,6 +472,7 @@ class TestModule < Test::Unit::TestCase
assert_equal(1, anc.count(BasicObject), ->{anc.inspect})
b = c.new(key: 1)
assert_equal(1, b.key)
+ assert_not_include(mod.ancestor_list, BasicObject)
end
def test_dup