Actions
Bug #21817
openRuby::Box crashes with refinement + bind_call + Symbol#to_proc combination
Bug #21817:
Ruby::Box crashes with refinement + bind_call + Symbol#to_proc combination
ruby -v:
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin25]
Tags:
Description
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¶
# 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:
binding.eval_methods.map { it.to_s } # This works
Files
Updated by ahogappa (sho hirano) about 2 months ago
Updated by nobu (Nobuyoshi Nakada) about 2 months ago
- Tags set to box
- Status changed from Open to Assigned
- Assignee set to tagomoris (Satoshi Tagomori)
- Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED
Actions