From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2026-01-25T08:39:32+00:00 Subject: [ruby-core:124618] [Ruby Bug#21326] Instruction generation differences between parse.y and prism for `def a(x, ...); b(...); end` Issue #21326 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ruby_3_4 commit:55920677854fe757c36368785f6dfdbce0b49ab7 merged revision(s) commit:86320a53002a3adaf35ad7434c70e86747a8b345. ---------------------------------------- Bug #21326: Instruction generation differences between parse.y and prism for `def a(x, ...); b(...); end` https://bugs.ruby-lang.org/issues/21326#change-116204 * Author: zenspider (Ryan Davis) * Status: Closed * Assignee: prism * ruby -v: ruby 3.5.0dev * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ---------------------------------------- Diff instructions using: ```sh DUMP="puts RubyVM::InstructionSequence.compile(ARGV.first).disasm.gsub(/^\d+ /, '')" RUBY="def a(x, ...); b(...); end" env -u RUBYOPT \ diff -U99 \ <(./build/ruby -v --parser=parse.y -e "$DUMP" "$RUBY" 2>/dev/null) \ <(./build/ruby -v --parser=prism -e "$DUMP" "$RUBY" 2>/dev/null) ``` shows: ```diff --- /dev/fd/63 2025-05-10 14:46:37 +++ /dev/fd/62 2025-05-10 14:46:37 @@ -1,17 +1,18 @@ -ruby 3.5.0dev (2025-05-10T17:32:21Z master 98667f82d2) +GC [arm64-darwin24] +ruby 3.5.0dev (2025-05-10T17:32:21Z master 98667f82d2) +PRISM +GC [arm64-darwin24] == disasm: #@:1 (1,0)-(1,26)> definemethod :a, a ( 1)[Li] putobject :a leave == disasm: #:1 (1,0)-(1,26)> local table (size: 5, argc: 1 [opts: 0, rest: 1, post: 0, block: 3, kw: -1@-1, kwrest: 2]) [ 5] x@0 [ 4] "*"@1[ 3] "**"@2[ 2] "&"@3[ 1] "..."@4 putself ( 1)[LiCa] getlocal_WC_0 "*"@1 -splatarray false +splatarray true getlocal_WC_0 "**"@2 getblockparamproxy "&"@3, 0 splatkw -send , nil +splatkw +send , nil leave [Re] ``` PR here: https://github.com/ruby/ruby/pull/13299 goes back to at least 3.4. -- 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/