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
I have tried to simplify the problem as much as possible and give all the contextual elements, but do not hesitate to ask me for any useful missing information.
The text was updated successfully, but these errors were encountered:
RDeckard
changed the title
"undefined method for nil:NilClass" on a legit (and working) pattern matching syntax
"undefined method for nil:NilClass" on pattern matching
Jun 29, 2022
RDeckard
changed the title
"undefined method for nil:NilClass" on pattern matching
"undefined method `include?' for nil:NilClass" on pattern matching
Jun 29, 2022
I have tried to simplify the problem as much as possible and give all the contextual elements, but do not hesitate to ask me for any useful missing information.
Expected behavior
change this:
to this:
shouldn't make Rubocop to crash.
Actual behavior
This syntax
makes Rubocop crash.
Steps to reproduce the problem
1. Create a
testfile.rb
with just this line2. Make sure that Rubocop works
$ rubocop testfile.rb Inspecting 1 file C Offenses: testfile.rb:1:1: C: [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment. existing_attributes => company:, document:, source: ^ 1 file inspected, 1 offense detected, 1 offense autocorrectable
3. change
testfile.rb
to this4. Make the issue happen
Context
RuboCop version
Config file
The text was updated successfully, but these errors were encountered: