diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-30 02:20:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-30 02:20:02 +0000 |
commit | a24ccfe6afd031fae389ff6b93dd38aa953d4311 (patch) | |
tree | eb60e10ad2f83f820e92768a141a29f6bcc220a3 /tool/vcs.rb | |
parent | 5ce70a08311209f621a7f231acb41f70cd1d36a0 (diff) |
vcs.rb: fix errors
* tool/vcs.rb (DebugSystem#system): fix undefined local variable
error. as system doesn't accept `exception:` option before 2.6,
remove it from `opts`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r-- | tool/vcs.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb index 5697a1b1e4..e710448ec1 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -94,7 +94,9 @@ else def system(*args, **opts) STDERR.puts [*args, **opts].inspect if $DEBUG if RUBY_VERSION >= "2.6" - opts[:exception] = true unless opts.key?(:exception) + exception = opts.fetch(:exception) {opts[:exception] = true} + else + exception = opts.delete(:exception) {true} end ret = super(*args, **opts) raise "Command failed with status (#$?): #{args[0]}" if exception and !ret |