diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-09-17 18:42:18 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-09-17 18:42:18 +0900 |
| commit | 9c85a94f5f1b553ccac3e7f232087424d1854f97 (patch) | |
| tree | 3ecd4580ba76eba7417918dc727d08b57776f60e /tool/lib | |
| parent | 6094cb51136418a7b545baa84b6ede0aaeb2eaac (diff) | |
vcs.rb: Drop support for ruby older than 2.6
Diffstat (limited to 'tool/lib')
| -rw-r--r-- | tool/lib/vcs.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 2c019d81fd..45b84b3035 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -51,23 +51,9 @@ module DebugPOpen end using DebugPOpen module DebugSystem - def system(*args) + def system(*args, exception: true, **opts) VCS.dump(args, "args: ") if $DEBUG - exception = false - opts = Hash.try_convert(args[-1]) - if RUBY_VERSION >= "2.6" - unless opts - opts = {} - args << opts - end - exception = opts.fetch(:exception) {opts[:exception] = true} - elsif opts - exception = opts.delete(:exception) {true} - args.pop if opts.empty? - end - ret = super(*args) - raise "Command failed with status (#$?): #{args[0]}" if exception and !ret - ret + super(*args, exception: exception, **opts) end end |
