Prefer self.class.name to self.class.to_s
This commit is contained in:
parent
4651b5214f
commit
502078099f
@ -40,7 +40,7 @@ def debrew(exception, formula=nil)
|
||||
raise exception unless $debugged_exceptions.add?(exception)
|
||||
|
||||
puts "#{exception.backtrace.first}"
|
||||
puts "#{Tty.red}#{exception.class.to_s}#{Tty.reset}: #{exception.to_s}"
|
||||
puts "#{Tty.red}#{exception.class.name}#{Tty.reset}: #{exception}"
|
||||
|
||||
begin
|
||||
again = false
|
||||
|
||||
@ -80,7 +80,7 @@ class Requirement
|
||||
private
|
||||
|
||||
def infer_name
|
||||
klass = self.class.to_s
|
||||
klass = self.class.name || self.class.to_s
|
||||
klass.sub!(/(Dependency|Requirement)$/, '')
|
||||
klass.sub!(/^(\w+::)*/, '')
|
||||
klass.downcase
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user