ruby-changes:8171
From: matz <ko1@a...>
Date: Mon, 6 Oct 2008 12:49:37 +0900 (JST)
Subject: [ruby-changes:8171] Ruby:r19699 (trunk): * test/ruby/test_module.rb (TestModule#test_mod_constants): should
matz 2008-10-06 12:49:17 +0900 (Mon, 06 Oct 2008) New Revision: 19699 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19699 Log: * test/ruby/test_module.rb (TestModule#test_mod_constants): should not depend on global Module constants. Modified files: trunk/ChangeLog trunk/test/ruby/test_module.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 19698) +++ ChangeLog (revision 19699) @@ -3,6 +3,9 @@ * 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 <matz@r...> * lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised): Index: test/ruby/test_module.rb =================================================================== --- test/ruby/test_module.rb (revision 19698) +++ test/ruby/test_module.rb (revision 19699) @@ -544,10 +544,11 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/