Always use class.name to build inspect strings
This commit is contained in:
parent
6a1ad36fbd
commit
fbefa76ce2
@ -55,7 +55,7 @@ class Dependency
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{name.inspect} #{tags.inspect}>"
|
||||
"#<#{self.class.name}: #{name.inspect} #{tags.inspect}>"
|
||||
end
|
||||
|
||||
# Define marshaling semantics because we cannot serialize @env_proc
|
||||
|
||||
@ -80,7 +80,7 @@ class DependencyCollector
|
||||
when Class
|
||||
parse_class_spec(spec, tags)
|
||||
else
|
||||
raise TypeError, "Unsupported type #{spec.class} for #{spec.inspect}"
|
||||
raise TypeError, "Unsupported type #{spec.class.name} for #{spec.inspect}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ class Option
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{flag.inspect}>"
|
||||
"#<#{self.class.name}: #{flag.inspect}>"
|
||||
end
|
||||
|
||||
private
|
||||
@ -115,7 +115,7 @@ class Options
|
||||
alias_method :to_ary, :to_a
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{to_a.inspect}>"
|
||||
"#<#{self.class.name}: #{to_a.inspect}>"
|
||||
end
|
||||
|
||||
def self.coerce(arg)
|
||||
|
||||
@ -79,7 +79,7 @@ class IOPatch < Patch
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{strip.inspect}>"
|
||||
"#<#{self.class.name}: #{strip.inspect}>"
|
||||
end
|
||||
end
|
||||
|
||||
@ -127,7 +127,7 @@ class ExternalPatch < Patch
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{strip.inspect} #{url.inspect}>"
|
||||
"#<#{self.class.name}: #{strip.inspect} #{url.inspect}>"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class Requirement
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}: #{name.inspect} #{tags.inspect}>"
|
||||
"#<#{self.class.name}: #{name.inspect} #{tags.inspect}>"
|
||||
end
|
||||
|
||||
def to_dependency
|
||||
|
||||
@ -11,7 +11,7 @@ class Version
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class} #{value.inspect}>"
|
||||
"#<#{self.class.name} #{value.inspect}>"
|
||||
end
|
||||
|
||||
def to_s
|
||||
@ -36,7 +36,7 @@ class Version
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}>"
|
||||
"#<#{self.class.name}>"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user