class OverflowError
inherits Exception
¶
Raised when the result of an arithmetic operation is outside of the range that can be represented within the given operands types.
Int32::MAX + 1 # raises OverflowError (Arithmetic overflow)
Int32::MIN - 1 # raises OverflowError (Arithmetic overflow)
Float64::MAX.to_f32 # raises OverflowError (Arithmetic overflow)