diff options
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 7d5eb99ff0..9b253b3776 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -351,6 +351,12 @@ class TestModule < Test::Unit::TestCase refute_equal original, b.inspect, bug6454 end + def test_public_include + assert_nothing_raised('#8846') do + Module.new.include(Module.new { def foo; end }).instance_methods == [:foo] + end + end + def test_included_modules assert_equal([], Mixin.included_modules) assert_equal([Mixin], User.included_modules) @@ -1380,6 +1386,12 @@ class TestModule < Test::Unit::TestCase assert_equal(expected, obj.m1) end + def test_public_prepend + assert_nothing_raised('#8846') do + Class.new.prepend(Module.new) + end + end + def test_prepend_inheritance bug6654 = '[ruby-core:45914]' a = labeled_module("a") |