diff options
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -1,7 +1,7 @@ # 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 "\n#{<<~'END_of_GUARD'}", binding, __FILE__, __LINE__ class TestPatternMatching < Test::Unit::TestCase class C @@ -92,7 +92,8 @@ class TestPatternMatching < Test::Unit::TestCase end assert_block do - verbose, $VERBOSE = $VERBOSE, nil # suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!" eval(%q{ case true in a @@ -100,7 +101,7 @@ class TestPatternMatching < Test::Unit::TestCase end }) ensure - $VERBOSE = verbose end assert_block do @@ -1274,6 +1275,23 @@ END 1 in a: }, /unexpected/, '[ruby-core:95098]') end end END_of_GUARD -$VERBOSE = verbose |