You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moduleInstanceMethods# Returns true if both instances have the same class and identical attributesdef ==(other)ifequal?(other)trueelsifother.instance_of?(self.class)keys=self.class.attributes.keysattributes.values_at(*keys) == other.attributes.values_at(*keys)elsefalseendendend
Actual behavior
$ rubocop -d test.rb
For /home/user/Code/project: configuration from /home/user/Code/project/.rubocop.yml
configuration from /home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-performance-1.7.0/config/default.yml
configuration from /home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-performance-1.7.0/config/default.yml
Default configuration from /home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-0.88.0/config/default.yml
configuration from /home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-rspec-1.42.0/config/default.yml
configuration from /home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-rspec-1.42.0/config/default.yml
Inspecting 1 file
Scanning /home/user/Code/project/test.rb
An error occurred while Style/CaseLikeIf cop was inspecting /home/user/Code/project/test.rb:4:4.
undefined method `literal?' for nil:NilClass
/home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-0.88.0/lib/rubocop/cop/style/case_like_if.rb:118:in `find_target_in_equality_node'
/home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-0.88.0/lib/rubocop/cop/style/case_like_if.rb:101:in `find_target_in_send_node'
/home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-0.88.0/lib/rubocop/cop/style/case_like_if.rb:91:in `find_target'
/home/user/.rvm/gems/ruby-2.6.6@project/gems/rubocop-0.88.0/lib/rubocop/cop/style/case_like_if.rb:37:in `on_if'
[...]
Steps to reproduce the problem
See above for command and gem versions
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
Expected behavior
Run without exception on sample file
Actual behavior
Steps to reproduce the problem
See above for command and gem versions
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:The text was updated successfully, but these errors were encountered: