diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2023-09-26 16:42:47 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2023-09-26 16:42:47 +0900 |
commit | 55a297c8400f397465a2c9ecf0f5324691420d2a (patch) | |
tree | 056e6a62ceac8de482033c295a3ebff25e06e2b3 /test/yarp | |
parent | 6b66b5fdedb2c9a9ee48e290d57ca7f8d55e01a2 (diff) | |
download | ruby-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.rb | 9 |
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 |