Skip to content

Make SymbolNode#value_loc non-optional - #4220

Merged
Earlopain merged 1 commit into
ruby:mainfrom
Earlopain:symbol-value-required
Sep 13, 2026
Merged

Make SymbolNode#value_loc non-optional#4220
Earlopain merged 1 commit into
ruby:mainfrom
Earlopain:symbol-value-required

Conversation

@Earlopain

@Earlopain Earlopain commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Sort of a followup for 929aec1 / #3772

It changed the value for :'' into nil/null, which is a bit inconvenient. For syntax-valid code I expect it to always be present.

It's also inconsistent with StringNode. In effect, this reverts the snapshots changes and the two changes in ruby for the ripper/parser compiler.

Sort of a followup for ruby@929aec1

It changed the value for `:''` into nil/null, which is a bit inconvenient.
For syntax-valid code I expect it to always be present.

It's also inconsistent with `StringNode`. In effect,
this reverts the snapshots changes and the two changes
in ruby for the ripper/parser compiler.
@Earlopain
Earlopain force-pushed the symbol-value-required branch from 7218c9e to 5c06479 Compare September 4, 2026 09:08
@Earlopain

Copy link
Copy Markdown
Collaborator Author

We can't have locations that can legitimatly be zero-length be optional anymore, now that optional locations use zero length to indicate absence. I quickly checked the other optional locations and didn't find anything else with this ambiguity

@Earlopain
Earlopain merged commit 531cd5e into ruby:main Sep 13, 2026
101 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Sep 13, 2026
(ruby/prism#4220)

Sort of a followup for ruby/prism@929aec1

It changed the value for `:''` into nil/null, which is a bit inconvenient.
For syntax-valid code I expect it to always be present.

It's also inconsistent with `StringNode`. In effect,
this reverts the snapshots changes and the two changes
in ruby for the ripper/parser compiler.

ruby/prism@531cd5e557
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.

1 participant