mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
55f0228bf8
Compress the 24-bit aspec into 13 free flag bits on RProc (bits 0-6 and 14-19) when wrapping cfunc methods. Field widths: req/opt 3 bits (max 7), post/key 2 bits (max 3), rest/kdict/block 1 bit each. Values exceeding the compressed range are clamped and rest is forced to 1. This enables Proc#arity and Proc#parameters to return correct results for cfunc-backed Procs (e.g. from Method#to_proc) with zero memory overhead -- no struct change needed. Closes #6764