From: "Earlopain (Earlopain _) via ruby-core" Date: 2026-04-15T11:55:41+00:00 Subject: [ruby-core:125277] [Ruby Bug#22002] argument stack underflow (-1) Issue #22002 has been updated by Earlopain (Earlopain _). Assignee set to prism It's a prism-specific issue and there are a few other usages that cause a similar result that I found. I fixed those in https://github.com/ruby/ruby/pull/16750 ---------------------------------------- Bug #22002: argument stack underflow (-1) https://bugs.ruby-lang.org/issues/22002#change-117031 * Author: anonymous128 (Anonymous 128) * Status: Open * Assignee: prism * ruby -v: ruby 4.0.1 (2026-01-13 revision e04267a14b) +PRISM [arm64-darwin25] * Backport: 3.3: DONTNEED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- The following lines of code: ```ruby sleep(0.1) until defined?(@variable) @variable ``` produce this error: ``` home@My-Air testing % bundle exec ruby test.rb -- raw disasm-------- trace: 1 0000 jump ( 1) [sp: 0, unremovable: 1, refcnt: 1] 0002 putnil ( 1) [sp: 1, unremovable: 0, refcnt: 1] 0003 pop ( 1) 0004 jump ( 1) [sp: 0, unremovable: 1, refcnt: 5] 0006 putself ( 1) 0007 putobject 0.1 ( 1) 0009 opt_send_without_block ( 1) 0011 pop ( 1) [sp: 0, unremovable: 0, refcnt: 2] [sp: 0, unremovable: 0, refcnt: 0] * 0012 branchunless ( 1) adjust: [label: 4] 0014 putnil ( 1) [sp: -1, unremovable: 0, refcnt: 4] 0015 pop ( 1) trace: 1 0016 getinstancevariable :@variable, ( 3) 0019 leave ( 3) --------------------- test.rb:1: argument stack underflow (-1) test.rb: compile error (SyntaxError) ``` -- 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/