aboutsummaryrefslogtreecommitdiffstats
path: root/test/yarp
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2023-09-26 16:42:47 +0900
committerYusuke Endoh <mame@ruby-lang.org>2023-09-26 16:42:47 +0900
commit55a297c8400f397465a2c9ecf0f5324691420d2a (patch)
tree056e6a62ceac8de482033c295a3ebff25e06e2b3 /test/yarp
parent6b66b5fdedb2c9a9ee48e290d57ca7f8d55e01a2 (diff)
downloadruby-55a297c8400f397465a2c9ecf0f5324691420d2a.tar.gz
Prevent warnings: "unused literal ignored"
The test emits many warnings under `RUBYOPT=-w` ``` [22699/26146] YARP::CompilerTest#test_FloatNode<compiled>:1: warning: unused literal ignored <compiled>:1: warning: unused literal ignored <compiled>:1: warning: unused literal ignored <compiled>:1: warning: unused literal ignored = 0.00 s ```
Diffstat (limited to 'test/yarp')
-rw-r--r--test/yarp/compiler_test.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb
index 0188987151..82732197e3 100644
--- a/test/yarp/compiler_test.rb
+++ b/test/yarp/compiler_test.rb
@@ -310,8 +310,13 @@ module YARP
def test_yarp_eval(source)
compare_eval(source)
- # Test "popped" functionality
- compare_eval("#{source}; 1")
+ begin
+ $VERBOSE, verbose_bak = nil, $VERBOSE
+ # Test "popped" functionality
+ compare_eval("#{source}; 1")
+ ensure
+ $VERBOSE = verbose_bak
+ end
end
end
end