Created
September 2, 2015 19:19
-
-
Save mathias/b5f7df42e1b0285ef38e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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