ruby-changes:55764
From: Nobuyoshi <ko1@a...>
Date: Tue, 21 May 2019 13:50:11 +0900 (JST)
Subject: [ruby-changes:55764] Nobuyoshi Nakada: f9696ca6cb (trunk): Simplified the guard against old versions
https://git.ruby-lang.org/ruby.git/commit/?id=f9696ca6cb From f9696ca6cbfe827b7ce7199e511fa7431f9333b1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 21 May 2019 10:30:13 +0900 Subject: Simplified the guard against old versions diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 335a519..bba83f6 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -2,9 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L2 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1143 end end end -begin # fix indent -end; +END_of_GUARD $VERBOSE = verbose -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/