1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Default @debug to $DEBUG

This commit is contained in:
Nobuyoshi Nakada 2019-06-28 12:41:03 +09:00
parent 4562dad94c
commit be14f62caf
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -164,6 +164,7 @@ class VCS
parser.on("--[no-]dryrun") {|v| @dryrun = v}
parser.on("--[no-]debug") {|v| @debug = v}
parser.parse(opts)
@debug = $DEBUG unless defined?(@debug)
@dryrun = @debug unless defined?(@dryrun)
when Hash
unless (keys = opts.keys - [:debug, :dryrun]).empty?