summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-07 03:47:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-07 03:47:46 +0000
commit12ee4e38950efaefaabafb552f06e9412d082d00 (patch)
treee53f6129e707eb68884de7ad712b48215bee7f58
parentba8006533c1efec720ea767a1d4bc630fed24872 (diff)
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
-rw-r--r--tool/vcs.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 5ef77e424d..43b18e4879 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -79,12 +79,15 @@ if RUBY_VERSION < "2.0"
end
else
module DebugPOpen
+ verbose, $VERBOSE = $VERBOSE, nil if RUBY_VERSION < "2.1"
refine IO.singleton_class do
def popen(*args)
STDERR.puts args.inspect if $DEBUG
super
end
end
+ ensure
+ $VERBOSE = verbose unless verbose.nil?
end
using DebugPOpen
end