Dividing by zero for Integer raises a ZeroDivisionError:
0 / 0 # ZeroDivisionError
However dividing by zero for Float does not:
0.0 / 0 #NaN
0 / 0.0 #NaN
0.0 /0.0 #NaN
1.0 / 0 #Infinity
1 / 0.0 #Infinity
1.0 /0.0 #Infinity
I was wondering why is there this difference in behaviour for Integer and Float in Ruby?