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:
parent
be0d9c0d26
commit
f9696ca6cb
1 changed files with 2 additions and 5 deletions
|
@ -2,9 +2,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
verbose, $VERBOSE = $VERBOSE, nil # suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!"
|
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
|
eval "\n#{<<~'END_of_GUARD'}", binding, __FILE__, __LINE__
|
||||||
begin;
|
|
||||||
end # fix indent
|
|
||||||
class TestPatternMatching < Test::Unit::TestCase
|
class TestPatternMatching < Test::Unit::TestCase
|
||||||
class C
|
class C
|
||||||
class << self
|
class << self
|
||||||
|
@ -1145,6 +1143,5 @@ END
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
begin # fix indent
|
END_of_GUARD
|
||||||
end;
|
|
||||||
$VERBOSE = verbose
|
$VERBOSE = verbose
|
||||||
|
|
Loading…
Add table
Reference in a new issue