diff --git a/ChangeLog b/ChangeLog index 9054db1642..e69b7e5ba9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ Mon Oct 6 12:45:20 2008 Yukihiro Matsumoto * test/ruby/test_module.rb (TestModule#_wrap_assertion): add definition. is this really needed? + * test/ruby/test_module.rb (TestModule#test_mod_constants): should + not depend on global Module constants. + Mon Oct 6 12:38:36 2008 Yukihiro Matsumoto * lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised): diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 17fbf56337..072f559c3c 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -544,10 +544,11 @@ class TestModule < Test::Unit::TestCase end def test_mod_constants - Module.const_set(:Foo, :foo) - assert_equal([:Foo], Module.constants(true)) - assert_equal([:Foo], Module.constants(false)) - Module.instance_eval { remove_const(:Foo) } + m = Module.new + m.const_set(:Foo, :foo) + assert_equal([:Foo], m.constants(true)) + assert_equal([:Foo], m.constants(false)) + m.instance_eval { remove_const(:Foo) } end def test_frozen_class