Skip to content

Commit

Permalink
Simplified the guard against old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 21, 2019
1 parent be0d9c0 commit f9696ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/ruby/test_pattern_matching.rb
Expand Up @@ -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
Expand Down Expand Up @@ -1145,6 +1143,5 @@ def test_struct
end
end
end
begin # fix indent
end;
END_of_GUARD
$VERBOSE = verbose

0 comments on commit f9696ca

Please sign in to comment.