1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplified the guard against old versions

This commit is contained in:
Nobuyoshi Nakada 2019-05-21 10:30:13 +09:00
parent be0d9c0d26
commit f9696ca6cb
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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