summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-09-17 14:15:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2024-09-17 14:15:44 +0900
commit70111fcc45b22b691aca2b522cb8eb30bf9fc34c (patch)
tree52ea0a6c79c42ea63b5b25f24bc209b4e4d2dc1e
parentd90da9408df5969427c6957797d5a3095f91077b (diff)
Prevent a warning due to error recovery of prism
-rw-r--r--test/ruby/test_symbol.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 2275de06a8..c50febf5d1 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -90,12 +90,15 @@ class TestSymbol < Test::Unit::TestCase
end
def test_inspect_dollar
+ verbose_bak, $VERBOSE = $VERBOSE, nil
# 4) :$- always treats next character literally:
assert_raise(SyntaxError) {eval ':$-'}
assert_raise(SyntaxError) {eval ":$-\n"}
assert_raise(SyntaxError) {eval ":$- "}
assert_raise(SyntaxError) {eval ":$-#"}
assert_raise(SyntaxError) {eval ':$-('}
+ ensure
+ $VERBOSE = verbose_bak
end
def test_inspect_number