lib/spf/result.rb in spf-0.0.1 vs lib/spf/result.rb in spf-0.0.2
- old
+ new
@@ -138,20 +138,20 @@
return self.code
end
def klass(name=nil)
if name
- name = name.to_sym if name.is_a?(String)
+ name = name.to_sym if String === name
return self.RESULT_CLASSES[name]
else
return name
end
end
def isa_by_name(name)
suspect_class = self.klass(name)
return false unless suspect_class
- return self.is_a?(suspect_class)
+ return suspect_class === self
end
def is_code(code)
return self.isa_by_name(code)
end