Skip to content

Instantly share code, notes, and snippets.

@javan
Created May 14, 2010 14:35
Show Gist options
  • Save javan/401235 to your computer and use it in GitHub Desktop.
Save javan/401235 to your computer and use it in GitHub Desktop.
irb(main):007:0> 0 / 0
ZeroDivisionError: divided by 0
from (irb):7:in `/'
from (irb):7
from :0
irb(main):006:0> 0.0 / 0
=> NaN
irb(main):014:0> 0.0 == 0
=> true
irb(main):015:0> 0.0 === 0
=> true
irb(main):008:0> 1 / 0
ZeroDivisionError: divided by 0
from (irb):8:in `/'
from (irb):8
from :0
irb(main):009:0> 1.0 / 0
=> Infinity
irb(main):012:0> 1 / 3
=> 0
irb(main):013:0> 1.0 / 3
=> 0.333333333333333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment