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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index fc594ec128..43e80a5955 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -372,11 +372,11 @@ class TestModule < Test::Unit::TestCase
assert_equal([:N], m.constants)
m.module_eval("module O end")
assert_equal([:N, :O], m.constants)
- m.module_eval("class C end")
+ m.module_eval("class C; end")
assert_equal([:N, :O, :C], m.constants)
assert_nil(m::N.name)
assert_match(/\A#<Module:.*>::O\z/, m::O.name)
- assert_match(/\A#<Class:.*>::O\z/, m::C.name)
+ assert_match(/\A#<Module:.*>::C\z/, m::C.name)
self.class.const_set(:M, m)
prefix = self.class.name + "::M::"
assert_equal(prefix+"N", m.const_get(:N).name)