Issue #21817 has been reported by ahogappa (sho hirano). ---------------------------------------- Bug #21817: Ruby::Box crashes with refinement + bind_call + Symbol#to_proc combination https://bugs.ruby-lang.org/issues/21817 * Author: ahogappa (sho hirano) * Status: Open * ruby -v: ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin25] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ## Description When running with `RUBY_BOX=1`, a combination of refinement on Binding class, `bind_call`, and `Symbol#to_proc` causes a crash with the error: `[BUG] BUG: Local ep without cme/box, flags: 66660087` ## Reproduction Script ```ruby # Run with: RUBY_BOX=1 ruby repro.rb using Module.new { refine ::Binding do def eval_methods ::Kernel.instance_method(:methods).bind_call(receiver) end end } p binding.eval_methods.map(&:to_s) ``` ## Expected Behavior The script should return an array of method names as strings. ## Actual Behavior Ruby crashes with `[BUG] BUG: Local ep without cme/box, flags: 66660087` ## Workaround Using block form instead of Symbol#to_proc does not crash: ```ruby binding.eval_methods.map { it.to_s } # This works ``` -- https://bugs.ruby-lang.org/