Skip to content

Don't replicate unary method bug in parser translator#4117

Merged
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:parser-negated-numeric
May 26, 2026
Merged

Don't replicate unary method bug in parser translator#4117
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:parser-negated-numeric

Conversation

@Earlopain
Copy link
Copy Markdown
Collaborator

@Earlopain Earlopain commented May 26, 2026

Closes #4112

Also see #2501, for which this was done. The expectation in rubocop is incorrect (produces code with semantic difference), so the test should be updated instead.

In any way, it should also have applied to +, where the same happens

Closes ruby#4112

Also see ruby#2501, for which this was done.
The expectation in rubocop is incorrect (produces code with semantic difference), so the test should be updated instead.

In any way, it should also have applied to `+`, where the same happens
@Earlopain Earlopain force-pushed the parser-negated-numeric branch from e2af1e4 to 9ea0933 Compare May 26, 2026 09:55
@kddnewton kddnewton merged commit 1f8cae2 into ruby:main May 26, 2026
61 checks passed
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.

Prism::Translation::Parser inconsistency in parsing numeric literals with unary + (plus) and - (minus)

2 participants