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
Throws an error: An error occurred while Style/NegatedIfElseCondition cop was inspecting example.rb
With debug flag:
Expected a Parser::Source::Range, Comment or Rubocop::AST::Node, got NilClass
/Users/david/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rubocop-1.2.0/lib/rubocop/cop/corrector.rb:94:in `to_range'
Steps to reproduce the problem
Run rubocop on the following code ( contrived example ) with the Style/NegatedIfElseCondition cop enabled:
some_val = 1
if !some_val.nil?
else
some_val = 2
end
Expected behavior
Not throw an error.
Actual behavior
Throws an error:
An error occurred while Style/NegatedIfElseCondition cop was inspecting example.rb
With debug flag:
Steps to reproduce the problem
Run rubocop on the following code ( contrived example ) with the Style/NegatedIfElseCondition cop enabled:
RuboCop version
The text was updated successfully, but these errors were encountered: