From a24ccfe6afd031fae389ff6b93dd38aa953d4311 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 30 Jan 2018 02:20:02 +0000 Subject: 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 --- tool/vcs.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tool/vcs.rb') 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 -- cgit v1.2.3