Skip to content

Bump go-ruby-parser to v0.1.5 (parenthesised call-arg assignment fix) - #503

Merged
tannevaled merged 1 commit into
mainfrom
feat/parser-v0.1.5
Aug 30, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/parser-v0.1.5

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go-ruby-parser v0.1.5 fixes a parser defect where an assignment used as a parenthesised call argument (or array element) gathered its right-hand side across commas into an implicit array:

ec.primitive_convert(src = +"…", dst = +"", nil, 10)
# parsed as a single argument  src = [+"…", dst = [+"", nil, 10]]
# → failed with: no implicit conversion of Array into String

The comma inside (…) / […] separates arguments, so multiple-assignment detection is now off there (as it already was for paren-less commands and def defaults). f(a = 1, b = 2, 3) now parses as three arguments; a = 1, 2, 3 at statement level still gathers its array RHS.

This is the standard mspec idiom for the mutating Encoding::Converter methods (primitive_convert / putback specs), verified byte-for-byte against MRI Ruby 4.0.6.

Conformance: ruby/spec ratchet FLOOR 16285 → 16315 (measured total 16355). go test ./... green, native + wasip1/wasm build, gofmt clean.

🤖 Generated with Claude Code

go-ruby-parser v0.1.5 fixes a parser defect where an assignment used as a
parenthesised call argument (or array element) gathered its right-hand
side across commas into an implicit array: primitive_convert(src = +"…",
dst = +"", nil, 10) parsed as a single argument src = [+"…", dst = [+"",
nil, 10]] instead of four arguments, so the call failed with "no implicit
conversion of Array into String".

This is the standard mspec idiom for the mutating Encoding::Converter
methods, and more generally f(a = 1, b = 2, 3) now parses as three
arguments. ruby/spec ratchet FLOOR 16285 -> 16315 (measured total 16355).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 3418c43 into main Aug 30, 2026
7 checks passed
@tannevaled
tannevaled deleted the feat/parser-v0.1.5 branch August 30, 2026 12:12
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