diff --git a/lib/recurly/resource.rb b/lib/recurly/resource.rb index b5856003e..c8a1ac620 100644 --- a/lib/recurly/resource.rb +++ b/lib/recurly/resource.rb @@ -15,7 +15,8 @@ def requires_client? end def ==(other_resource) - self.attributes == other_resource.attributes + other_resource.is_a?(Recurly::Resource) && + attributes == other_resource.attributes end # Hide instance variables to keep from accidental logging