mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
remove uneffective test
RubyVM.stat[:global_method_state] is no longer available so this test doesn't check any more.
This commit is contained in:
parent
278450de80
commit
2e8b5968e1
Notes:
git
2020-10-14 23:15:48 +09:00
1 changed files with 0 additions and 25 deletions
|
@ -2529,31 +2529,6 @@ class TestModule < Test::Unit::TestCase
|
||||||
assert_raise(NoMethodError, bug8284) {Object.remove_const}
|
assert_raise(NoMethodError, bug8284) {Object.remove_const}
|
||||||
end
|
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
|
def test_return_value_of_define_method
|
||||||
retvals = []
|
retvals = []
|
||||||
Class.new.class_eval do
|
Class.new.class_eval do
|
||||||
|
|
Loading…
Add table
Reference in a new issue