summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-10-03 13:33:14 -0400
committergit <svn-admin@ruby-lang.org>2024-10-03 17:43:11 +0000
commit568511f3937502aa84a33f321508bd2cda652303 (patch)
treefa8c550cb6ec3a0515195a7c4cdd26a8100ee271 /test
parentf8568fbd7f87f749de46abc6ce07b9d3e0c6b40d (diff)
[ruby/prism] Handle single global variable character name
https://github.com/ruby/prism/commit/7a0af49997
Diffstat (limited to 'test')
-rw-r--r--test/prism/magic_comment_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/prism/magic_comment_test.rb b/test/prism/magic_comment_test.rb
index 14653fb0f8..ab4b5f56e5 100644
--- a/test/prism/magic_comment_test.rb
+++ b/test/prism/magic_comment_test.rb
@@ -87,7 +87,14 @@ module Prism
# Compare against Ruby's expectation.
if defined?(RubyVM::InstructionSequence)
- expected = RubyVM::InstructionSequence.compile(source).eval.encoding
+ previous = $VERBOSE
+ expected =
+ begin
+ $VERBOSE = nil
+ RubyVM::InstructionSequence.compile(source).eval.encoding
+ ensure
+ $VERBOSE = previous
+ end
assert_equal expected, actual
end
end