mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vcs.rb: suppress warning
* tool/vcs.rb (DebugPOpen): suppress refinements warning in 2.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba8006533c
commit
12ee4e3895
1 changed files with 3 additions and 0 deletions
|
@ -79,12 +79,15 @@ if RUBY_VERSION < "2.0"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
module DebugPOpen
|
module DebugPOpen
|
||||||
|
verbose, $VERBOSE = $VERBOSE, nil if RUBY_VERSION < "2.1"
|
||||||
refine IO.singleton_class do
|
refine IO.singleton_class do
|
||||||
def popen(*args)
|
def popen(*args)
|
||||||
STDERR.puts args.inspect if $DEBUG
|
STDERR.puts args.inspect if $DEBUG
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
$VERBOSE = verbose unless verbose.nil?
|
||||||
end
|
end
|
||||||
using DebugPOpen
|
using DebugPOpen
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue