We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987eae9 commit 2f05515Copy full SHA for 2f05515
lib/zendesk_api/resource.rb
@@ -135,15 +135,14 @@ def ==(other)
135
136
return true if other.object_id == object_id
137
138
- if other.is_a?(Data)
139
- other.id && other.id == id
140
- elsif other.is_a?(Integer)
141
- id == other
142
- else
143
- warn "Trying to compare #{other.class} to a Resource from #{caller.first}"
144
-
145
- false
+ return other.id && (other.id == id) if other.is_a?(Data)
+
+ unless other.is_a?(Integer)
+ return warn "Trying to compare #{other.class} to a Resource
+ from #{caller.first}"
146
end
+ id == other
147
148
alias :eql :==
149
0 commit comments