Always use class.name to build inspect strings

This commit is contained in:
Jack Nagel 2014-07-01 15:07:06 -05:00
parent 6a1ad36fbd
commit fbefa76ce2
6 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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