ruby-changes:66160
From: Koichi <ko1@a...>
Date: Wed, 12 May 2021 12:59:49 +0900 (JST)
Subject: [ruby-changes:66160] 3df7c967bb (master): suppress warnings on repeat tests.
https://git.ruby-lang.org/ruby.git/commit/?id=3df7c967bb From 3df7c967bb5fca8767f384374710b1a1529ee37a Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 12 May 2021 12:53:14 +0900 Subject: 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). --- test/ruby/test_gc.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index f10946b..c3fc104 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -497,8 +497,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L497 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/