mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e60acfc6ff
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>