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

?\ followed by EOF wrongly parsed as empty string node #3144

Closed
tompng opened this issue Oct 5, 2024 · 0 comments · Fixed by #3146
Closed

?\ followed by EOF wrongly parsed as empty string node #3144

tompng opened this issue Oct 5, 2024 · 0 comments · Fixed by #3146

Comments

@tompng
Copy link
Member

tompng commented Oct 5, 2024

?\ ?\C-\ ?\M-\ ?\M-\C-\ followed by EOF are parsed as empty string

codes = <<~'RUBY'.split("\n")
  ?\
  ?\c\
  ?\C-\
  ?\M-\C-\
RUBY
p codes.map { eval _1 }
#=> ["", "", "", "", ""]
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 a pull request may close this issue.

1 participant