ruby-changes:63348
From: Koichi <ko1@a...>
Date: Wed, 14 Oct 2020 23:15:47 +0900 (JST)
Subject: [ruby-changes:63348] 2e8b5968e1 (master): remove uneffective test
https://git.ruby-lang.org/ruby.git/commit/?id=2e8b5968e1 From 2e8b5968e13139510bd169cc33fdaa8a4b0676fc Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 14 Oct 2020 16:34:24 +0900 Subject: remove uneffective test RubyVM.stat[:global_method_state] is no longer available so this test doesn't check any more. diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 3003a74..6c0fe6b 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -2529,31 +2529,6 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_module.rb#L2529 assert_raise(NoMethodError, bug8284) {Object.remove_const} end - def test_include_module_with_constants_does_not_invalidate_method_cache - assert_in_out_err([], <<-RUBY, %w(123 456 true), []) - A = 123 - - class Foo - def self.a - A - end - end - - module M - A = 456 - 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 - def test_return_value_of_define_method retvals = [] Class.new.class_eval do -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/