Exception: ZeroDivisionError
- Inherits:
-
StandardError
- Object
- Exception
- StandardError
- ZeroDivisionError
- Defined in:
- numeric.c,
numeric.c
Overview
Raised when attempting to divide an integer by 0.
42 / 0
raises the exception:
ZeroDivisionError: divided by 0
Note that only division by an exact 0 will raise that exception:
42 / 0.0 #=> Float::INFINITY
42 / -0.0 #=> -Float::INFINITY
0 / 0.0 #=> NaN
Method Summary
Methods inherited from Exception
#==, #backtrace, #exception, exception, #initialize, #inspect, #message, #set_backtrace, #to_s
Constructor Details
This class inherits a constructor from Exception