diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 9153297d39..0af5e3ad97 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true require 'test/unit' +verbose, $VERBOSE = $VERBOSE, nil # suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!" +eval "#{<<~"begin;"}\n#{<<~'end;'}".gsub(/^.*# fix indent\n/, ''), binding, __FILE__, __LINE__+2 +begin; +end # fix indent class TestPatternMatching < Test::Unit::TestCase class C class << self @@ -1085,3 +1089,6 @@ END end end end +begin # fix indent +end; +$VERBOSE = verbose