aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_pattern_matching.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-21 10:30:13 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-21 13:49:31 +0900
commitf9696ca6cbfe827b7ce7199e511fa7431f9333b1 (patch)
treeb97e78820ddee2f8d6268c999bcc48864ba469f2 /test/ruby/test_pattern_matching.rb
parentbe0d9c0d26adcf8017d0ce4adf782c1bea2b7240 (diff)
downloadruby-f9696ca6cbfe827b7ce7199e511fa7431f9333b1.tar.gz
Simplified the guard against old versions
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r--test/ruby/test_pattern_matching.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 335a5193fa..bba83f662e 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -2,9 +2,7 @@
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
+eval "\n#{<<~'END_of_GUARD'}", binding, __FILE__, __LINE__
class TestPatternMatching < Test::Unit::TestCase
class C
class << self
@@ -1145,6 +1143,5 @@ END
end
end
end
-begin # fix indent
-end;
+END_of_GUARD
$VERBOSE = verbose