Files
Yukihiro "Matz" Matsumoto 735b94535c numeric.c: raise TypeError for non-Integer bitwise operands
Integer#&, #| and #^ read the right-hand operand with mrb_integer()
without checking its type. For a Float (or any non-Integer) this reads an
unrelated union field and returns a garbage value instead of raising, as
CRuby does. Raise TypeError via mrb_int_noconv() when the operand is not
an Integer. Bigint operands are still handled before this point, and the
shift operators keep coercing their width as before.

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-05 11:23:43 +09:00
..