Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support beginless and endless ranges in parser #1549

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stackmystack
Copy link

@stackmystack stackmystack commented Jul 29, 2024

Description

Fixes #1521.

Avoid errors like:

  `first': cannot get the first element of beginless range

Completed Tasks

  • I have read the [Contributing Guide][contrib].
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).
    • for ast_node.rb
    • for ruby_parser.rb : this one is a bit more involved (and may be unnecessary since it touches on the whole test suite), and I don't think I want to commit to writing tests for it if PR altogether is rejected for any reason.

@stackmystack stackmystack force-pushed the fix-range-access branch 3 times, most recently from 51864d3 to c3b9b72 Compare September 12, 2024 12:26
@stackmystack
Copy link
Author

Hello, Could you please allow the tests to run again?
I fixed them on my branch, and it should work everywhere else.

PS:

In the CI run, runners on macOS+amd64 and ruby < 2.6 do not work. You should remove them I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RangeError When using pattern matching in YARD documentation generation
1 participant