diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_syntax.rb | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 3dae3916ff..137da09bc3 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1328,8 +1328,6 @@ class TestModule < Test::Unit::TestCase end end include LangModuleSpecInObject - module LangModuleTop - end puts "ok" if LangModuleSpecInObject::LangModuleTop == LangModuleTop INPUT diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 1d7b89de57..b0ad012131 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1907,6 +1907,21 @@ eom assert_equal 0...1, exp.call(a: 0) end + def test_class_module_Object_ancestors + assert_separately([], <<-RUBY) + m = Module.new + m::Bug18832 = 1 + include m + class Bug18832; end + RUBY + assert_separately([], <<-RUBY) + m = Module.new + m::Bug18832 = 1 + include m + module Bug18832; end + RUBY + end + def test_cdhash assert_separately([], <<-RUBY) n = case 1 when 2r then false else true end |