summaryrefslogtreecommitdiff
path: root/test/ruby/test_const.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-17 05:01:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-17 05:01:41 +0000
commiteb4dc17956d730f41a149f63469284ff5187c52b (patch)
tree2bdb2e2bd4d0d32f44563d3a7ccd880c53500f2a /test/ruby/test_const.rb
parent78baa98e69f741ba92823470ffb3875838c912ab (diff)
downloadruby-eb4dc17956d730f41a149f63469284ff5187c52b.tar.gz
test_const.rb: suppress warnings
* test/ruby/test_const.rb (test_redefinition_memory_leak): suppress warnings instead of redirecting to null device. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_const.rb')
-rw-r--r--test/ruby/test_const.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/ruby/test_const.rb b/test/ruby/test_const.rb
index 892d775319..8d50464988 100644
--- a/test/ruby/test_const.rb
+++ b/test/ruby/test_const.rb
@@ -62,11 +62,8 @@ WARNING
def test_redefinition_memory_leak
code = <<-PRE
-olderr = $stderr.dup
-$stderr.reopen(File::NULL, "wb")
350000.times { FOO = :BAR }
-$stderr.reopen(olderr)
PRE
- assert_no_memory_leak([], '', code, 'redefined constant', timeout: 30)
+ assert_no_memory_leak(%w[-W0 -], '', code, 'redefined constant', timeout: 30)
end
end