Files
Yukihiro "Matz" Matsumoto e60acfc6ff mruby-numeric-ext: add Integer#bit_length
Implement Integer#bit_length in mrbgems/mruby-numeric-ext.
- Fixnum: zero returns 0; negatives follow ~self rule; count bits by shifts.
- Bigint (MRB_USE_BIGINT): handle sign; negatives via mrb_bint_rev, then bit
  length via length of mrb_bint_to_s(..., 2).
- Add tests in mrbgems/mruby-numeric-ext/test/numeric.rb.
- Update README with examples.

Co-authored-by: Codex CLI <codex@openai.com>
2025-08-14 10:53:12 +09:00
..