lib/byebug/commands/var/const.rb in byebug-10.0.2 vs lib/byebug/commands/var/const.rb in byebug-11.0.0

- old
+ new

@@ -31,12 +31,10 @@ "Shows constants of an object." end def execute obj = warning_eval(str_obj) - unless obj.is_a?(Module) - return errmsg(pr("variable.errors.not_module", object: str_obj)) - end + return errmsg(pr("variable.errors.not_module", object: str_obj)) unless obj.is_a?(Module) constants = warning_eval("#{str_obj}.constants") puts prv(constants.sort.map { |c| [c, obj.const_get(c)] }, "constant") end