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
My (working) Rails code seems to be causing the IfUnlessModifier cop to choke.
Actual behavior
$ rubocop --debug app/models/user.rb
An error occurred while Style/IfUnlessModifier cop was inspecting app/models/user.rb:28:60.
undefined method `last_argument' for #<RuboCop::AST::Node:0x00007f9fe625a890>Did you mean? last_line/Users/goulven/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/rubocop-1.13.0/lib/rubocop/cop/style/if_unless_modifier.rb:71:in `autocorrect'/Users/goulven/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/rubocop-1.13.0/lib/rubocop/cop/style/if_unless_modifier.rb:62:in `block in on_if'/Users/goulven/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/rubocop-1.13.0/lib/rubocop/cop/base.rb:342:in `correct'
/Users/goulven/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/rubocop-1.13.0/lib/rubocop/cop/base.rb:127:in `add_offense'/Users/goulven/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/rubocop-1.13.0/lib/rubocop/cop/style/if_unless_modifier.rb:61:in `on_if'
My (working) Rails code seems to be causing the IfUnlessModifier cop to choke.
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: