Skip to content

chore(deps): bump go-ruby-parser/parser to v0.1.3 (multi-line ternary) - #259

Merged
tannevaled merged 1 commit into
mainfrom
chore/bump-parser-multiline-ternary
Aug 3, 2026
Merged

tannevaled merged 1 commit into
mainfrom
chore/bump-parser-multiline-ternary

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Bumps github.com/go-ruby-parser/parser v0.1.2 -> v0.1.3.

The new parser release (go-ruby-parser/parser#16) accepts a ternary cond ? then : else split across physical lines — newlines after ?, on either side of :, and before the else arm — matching MRI (ruby 4.0.x). The newline before the : previously failed with expected :, got NEWLINE, hit while authoring the Ruby wasmdesk client.

TestRunMultilineTernary (in run_test.go) runs the shapes end-to-end through ruby.Run:

p (true ?
 1 :
 2)          # => 1

p (false ?
 "a"
: "b")       # => "b"

Gate: go build, go vet, gofmt clean; -race + 100% coverage (internal coverpkg).

🤖 Generated with Claude Code

parser v0.1.3 accepts a ternary `cond ? then : else` split across lines
(newlines after `?`, around `:`, and before the else arm), matching MRI.
Adds TestRunMultilineTernary covering `p (true ?\n 1 :\n 2)` => 1 and a
newline-before-`:` form, both of which previously failed to parse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit eac8d20 into main Aug 3, 2026
5 checks passed
@tannevaled
tannevaled deleted the chore/bump-parser-multiline-ternary branch August 3, 2026 11:32
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