From: "steviejj (Steven Johnstone) via ruby-core" Date: 2026-12-02T18:34:39+00:00 Subject: [ruby-core:127804] [Ruby Bug#22706] parse.y: `o[5, *[**{}]] = 8` spuriously rejected as `keyword arg given in index assignment` Issue #22706 has been reported by steviejj (Steven Johnstone). ---------------------------------------- Bug #22706: parse.y: `o[5, *[**{}]] = 8` spuriously rejected as `keyword arg given in index assignment` https://bugs.ruby-lang.org/issues/22706 * Author: steviejj (Steven Johnstone) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Differential fuzzing against prism. ```ruby o = Object.new def o.[]=(*args); p args; end o[5, *[**{}]] = 8 # => [5, 8] o[5, *[**{a: 1}]] = 8 # => [5, {a: 1}, 8] ``` parse.y: ``` test.rb:4: keyword arg given in index assignment (SyntaxError) o[5, *[**{}]] = 8 # => [5, 8] ^~~~ test.rb:5: keyword arg given in index assignment o[5, *[**{a: 1}]] = 8 # => [5, {a: 1}, 8] ^~~~~~~~ ``` prism: ``` [5, 8] [5, {a: 1}, 8] ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/