From: "luke-gru (Luke Gruber) via ruby-core" Date: 2024-09-07T16:22:42+00:00 Subject: [ruby-core:119097] [Ruby master Bug#20720] prism incorrectly marks SuperNode as forwarding in some cases Issue #20720 has been updated by luke-gru (Luke Gruber). PR here: https://github.com/ruby/ruby/pull/11565 ---------------------------------------- Bug #20720: prism incorrectly marks SuperNode as forwarding in some cases https://bugs.ruby-lang.org/issues/20720#change-109685 * Author: luke-gru (Luke Gruber) * Status: Open * ruby -v: 3.4.0dev * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```ruby class A def foo(*b, &block) end end class B < A def foo(...) super() puts "2" end end ``` results in: ``` ./ruby --parser=prism -I../ruby/lib -I. -I.ext/x86_64-linux -I.ext/common -r./x86_64-linux-fake ../ruby/test.rb -- raw disasm-------- trace: 8 trace: 1 [sp: 0, unremovable: 0, refcnt: 0] 0000 putself ( 284) 0001 invokesuperforward , nil ( 284) * 0004 pop ( 284) trace: 1 0005 putself ( 285) 0006 putchilledstring "2" ( 285) 0008 opt_send_without_block ( 285) trace: 10 0010 leave ( 286) --------------------- ../ruby/test.rb: ../ruby/test.rb:284: argument stack underflow (-1) (SyntaxError) ``` It should differentiate between forwarding nodes and non-ZSUPER Super nodes with no arguments. -- 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/