diff options
author | Yusuke Endoh <[email protected]> | 2023-08-09 15:35:16 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2023-08-09 15:35:16 +0900 |
commit | 86f4415fb8e1da61eb9e844c68e41e30393eeac7 (patch) | |
tree | c760b40ce702ef052cbc1c72e2a5528f479ba6c7 | |
parent | 48c3b0867221c79c0a079a006ae628318c4cb3a7 (diff) |
Prevent a warning: global variable `$VERSION' not initialized
-rw-r--r-- | test/test_trick.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_trick.rb b/test/test_trick.rb index ddedb6e527..878d79e628 100644 --- a/test/test_trick.rb +++ b/test/test_trick.rb @@ -243,6 +243,8 @@ class TestAllRubyQuine < Test::Unit::TestCase def test_all_ruby_quine stdout_bak = $stdout $stdout = StringIO.new + verbose_bak = $VERBOSE + $VERBOSE = nil src = File.read(File.join(__dir__, "../sample/all-ruby-quine.rb")) eval(src) @@ -266,5 +268,6 @@ class TestAllRubyQuine < Test::Unit::TestCase assert_equal(RUBY_VERSION, out) ensure $stdout = stdout_bak + $VERBOSE = verbose_bak end end |