Skip to content

Instantly share code, notes, and snippets.

@rafaelp
Created February 27, 2012 18:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelp/1925879 to your computer and use it in GitHub Desktop.
Save rafaelp/1925879 to your computer and use it in GitHub Desktop.
Is Ruby Javascript like?
ruby-1.9.2-p290 :001 > 0/0
ZeroDivisionError: divided by 0
from (irb):1:in `/'
from (irb):1
from /Users/rafael/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
ruby-1.9.2-p290 :002 > 1.0/0
=> Infinity
ruby-1.9.2-p290 :003 > 0.0/0
=> NaN
ruby-1.9.2-p290 :004 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment