summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 13:38:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 13:38:00 +0000
commit78c81718d2ee1e7f9b1b573b3b4eb2eab1fb0f94 (patch)
treed172e7788c3ad6aa59053c316ce166fe664a61ea /tool
parenteab10990ac482798b03e47c9c6085384ed0a47fb (diff)
downloadruby-78c81718d2ee1e7f9b1b573b3b4eb2eab1fb0f94.tar.gz
vcs.rb: old version cannot refine modules
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/vcs.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index a7cfa08d52..7bbc50b4b2 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -86,18 +86,21 @@ else
super
end
end
- refine Kernel do
- def system(*args, exception: true, **opts)
- STDERR.puts [*args, **opts].inspect if $DEBUG
- ret = super(*args, **opts, exception: exception)
- raise "Command failed with status (#$?): #{args[0]}" if exception and !ret
- ret
- end
- end
ensure
$VERBOSE = verbose unless verbose.nil?
end
using DebugPOpen
+ module DebugSystem
+ def system(*args, exception: true, **opts)
+ STDERR.puts [*args, **opts].inspect if $DEBUG
+ ret = super(*args, **opts, exception: exception)
+ raise "Command failed with status (#$?): #{args[0]}" if exception and !ret
+ ret
+ end
+ end
+ module Kernel
+ prepend(DebugSystem)
+ end
end
class VCS