rubocop / rubocop-rspec

Code style checking for RSpec files.
https://docs.rubocop.org/rubocop-rspec
MIT License
794 stars 272 forks source link

Bug in parsing a beginless or endless range for the `RepeatedIncludeExample` cop #1866

Closed hasghari closed 3 months ago

hasghari commented 3 months ago

The following snippet of code results in a bug:

include_examples 'something', ..1

The error message is:

Failure/Error: children.all?(&:recursive_literal_or_const?)

NoMethodError:
  undefined method `recursive_literal_or_const?' for nil:NilClass
pirj commented 3 months ago

Would you like to attempt to fix it?