File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 44require  'zendesk_api/association' 
55require  'zendesk_api/associations' 
66require  'zendesk_api/verbs' 
7+ require  'byebug' 
78
89# See docs: https://developer.zendesk.com/api-reference/ 
910module  ZendeskAPI 
@@ -135,15 +136,14 @@ def ==(other)
135136
136137      return  true  if  other . object_id  == object_id 
137138
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 }  " 
139+       return  other . id  && ( other . id  == id )  if  other . is_a? ( Data ) 
144140
145-         false 
141+       unless  other . is_a? ( Integer ) 
142+         return  warn  "Trying to compare #{ other . class }   to a Resource 
143+           from #{ caller . first }  " 
146144      end 
145+ 
146+       id  == other 
147147    end 
148148    alias  :eql  :== 
149149
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments