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