mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress warnings on repeat tests.
Constant definitions are affect on outer namespace of an anonymous module. To define constants on the anonymous module, this patch uses Module#class_eval(str).
This commit is contained in:
parent
6911b4bc82
commit
3df7c967bb
1 changed files with 2 additions and 3 deletions
|
@ -497,8 +497,7 @@ class TestGc < Test::Unit::TestCase
|
|||
|
||||
def test_ast_node_buffer
|
||||
# https://github.com/ruby/ruby/pull/4416
|
||||
Module.new.class_eval do
|
||||
eval((["# shareable_constant_value: literal"] + (0..100000).map {|i| "M#{ i } = {}" }).join("\n"))
|
||||
end
|
||||
Module.new.class_eval( (["# shareable_constant_value: literal"] +
|
||||
(0..100000).map {|i| "M#{ i } = {}" }).join("\n"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue