lib/byebug/commands/set.rb in byebug-11.0.1 vs lib/byebug/commands/set.rb in byebug-11.1.0
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
-require "byebug/command"
-require "byebug/helpers/parse"
+require_relative "../command"
+require_relative "../helpers/parse"
module Byebug
#
# Change byebug settings.
#
@@ -48,10 +48,10 @@
return errmsg(pr("set.errors.unknown_setting", key: key)) unless setting
if !setting.boolean? && value.nil?
err = pr("set.errors.must_specify_value", key: key)
elsif setting.boolean?
- value, err = get_onoff(value, key =~ /^no/ ? false : true)
+ value, err = get_onoff(value, /^no/.match?(key) ? false : true)
elsif setting.integer?
value, err = get_int(value, setting.to_sym, 1)
end
return errmsg(err) if value.nil?