Skip to content

Instantly share code, notes, and snippets.

@mathias
Created September 2, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathias/b5f7df42e1b0285ef38e to your computer and use it in GitHub Desktop.
Save mathias/b5f7df42e1b0285ef38e to your computer and use it in GitHub Desktop.
1] pry(main)> Integer("1")
=> 1
[2] pry(main)> "1".to_i
=> 1
[3] pry(main)> Integer("lol")
ArgumentError: invalid value for Integer(): "lol"
from (pry):3:in `Integer'
[4] pry(main)> "lol".to_i
=> 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment