ruby-changes:37021
From: hsbt <ko1@a...>
Date: Fri, 2 Jan 2015 16:21:45 +0900 (JST)
Subject: [ruby-changes:37021] hsbt:r49102 (trunk): * test/ruby/test_module.rb: Refactor invalid testcase.
hsbt 2015-01-02 16:21:36 +0900 (Fri, 02 Jan 2015) New Revision: 49102 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49102 Log: * test/ruby/test_module.rb: Refactor invalid testcase. [fix GH-472][ruby-core:59035][Bug #9240] Modified files: trunk/ChangeLog trunk/test/ruby/test_module.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 49101) +++ ChangeLog (revision 49102) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jan 2 16:18:44 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * test/ruby/test_module.rb: Refactor invalid testcase. + [fix GH-472][ruby-core:59035][Bug #9240] + Fri Jan 2 15:53:00 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> * lib/webrick/utils.rb: removed unused argument variable. Index: test/ruby/test_module.rb =================================================================== --- test/ruby/test_module.rb (revision 49101) +++ test/ruby/test_module.rb (revision 49102) @@ -1926,8 +1926,8 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_module.rb#L1926 assert_raise(NoMethodError, bug8284) {Object.define_method} end - def test_include_module_with_constants_invalidates_method_cache - assert_in_out_err([], <<-RUBY, %w(123 456), []) + def test_include_module_with_constants_does_not_invalidate_method_cache + assert_in_out_err([], <<-RUBY, %w(123 456 true), []) A = 123 class Foo @@ -1941,8 +1941,13 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_module.rb#L1941 end puts Foo.a + starting = RubyVM.stat[:global_method_state] + Foo.send(:include, M) + + ending = RubyVM.stat[:global_method_state] puts Foo.a + puts starting == ending RUBY end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/