From 37442dc8ead594f88ae53aac02c33b7a775fcc13 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 26 Sep 2026 19:18:57 +0200 Subject: [PATCH] =?UTF-8?q?deps:=20parser=20v0.6.0=20=E2=80=94=20refuse=20?= =?UTF-8?q?paren-less=20command=20calls=20in=20argument=20positions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.6.0 makes the parser REFUSE more, not accept more. A paren-less command call was being accepted in argument positions where MRI rejects it: [foo bar], {k: foo bar}, f(1, foo bar), 1 + foo bar, -foo bar, def m(a = foo bar), x = *foo bar, defined? foo bar, and more. Gate for a refusing change is an enumerated both-directions table, not a corpus sweep: a corpus of valid Ruby contains none of the shapes being refused, so it is structurally blind here. 135 shapes judged against local MRI 4.0.5 with both `ruby --parser=prism -c` and `ruby --parser=parse.y -c`: 40 accepted -> REFUSED, every one refused by both MRI parsers 0 REFUSED -> accepted 0 shapes where we now refuse something MRI accepts The boundary is head-position, not paren-versus-bracket: `a[foo bar]` is an index bracket (call_args: command) and stays accepted; `[foo bar]` is an array literal (aref_args: arg_value) and is now refused. Likewise `f(foo bar, 1)` stays accepted while `f(1, foo bar)` is refused. 17 index and head-position shapes verified unmoved. Co-Authored-By: Claude Opus 5 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cf387b9e..0ee3a9c3 100644 --- a/go.mod +++ b/go.mod @@ -129,7 +129,7 @@ require ( github.com/go-ruby-pagy/pagy v0.0.0-20260717071719-997d15eee011 github.com/go-ruby-paper-trail/paper-trail v0.0.0-20260717071745-42a249656e5a github.com/go-ruby-parquet/parquet v0.0.0-20260923211642-bc75bcb9031e - github.com/go-ruby-parser/parser v0.5.0 + github.com/go-ruby-parser/parser v0.6.0 github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f github.com/go-ruby-pg/pg v0.0.0-20260916100523-3831ec811a67 github.com/go-ruby-prawn/prawn v0.0.0-20260829111617-4a543d91acca diff --git a/go.sum b/go.sum index 6712f684..914b1004 100644 --- a/go.sum +++ b/go.sum @@ -527,8 +527,8 @@ github.com/go-ruby-paper-trail/paper-trail v0.0.0-20260717071745-42a249656e5a h1 github.com/go-ruby-paper-trail/paper-trail v0.0.0-20260717071745-42a249656e5a/go.mod h1:z370KNJcUH8n39yLdlT0Y1QvHukxjsq1XjGpIzvfqWE= github.com/go-ruby-parquet/parquet v0.0.0-20260923211642-bc75bcb9031e h1:pxhP3nIRxTpj99e74JAVpGj7JQtRSNqLb+B5x2WT5N4= github.com/go-ruby-parquet/parquet v0.0.0-20260923211642-bc75bcb9031e/go.mod h1:wC+J6qfQ8C0aKgi5qsbR03DYrLLuXXezUBHl967am/E= -github.com/go-ruby-parser/parser v0.5.0 h1:ew+1IHpmvYbo7T0Gu1+gFpTHmj1jabwU9Uis3zSQUrk= -github.com/go-ruby-parser/parser v0.5.0/go.mod h1:NRbX4dYcQ6CgcaSaMmu1dh95QuKGq+RdenUoWU73214= +github.com/go-ruby-parser/parser v0.6.0 h1:bjEZP8wJDiNVQbIoxD6ehqFZvjakDUHB5Wc0cCUkdWg= +github.com/go-ruby-parser/parser v0.6.0/go.mod h1:NRbX4dYcQ6CgcaSaMmu1dh95QuKGq+RdenUoWU73214= github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f h1:9pt89wlAp12vbCNGFYmbSqp/PJTHRwUx1yNDXW5hWRI= github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f/go.mod h1:IvW5q5Kyl5l3hrYwiHylOEmk5hpGSo7XqcmUXBHF5H0= github.com/go-ruby-pg/pg v0.0.0-20260916100523-3831ec811a67 h1:X9MKhEAV60oYoL94tqb11lfLw3yW097mVqfjDdy5PK0=