Skip to content

Instantly share code, notes, and snippets.

@cawel
Created November 25, 2015 23:42
Show Gist options
  • Save cawel/678a84f5387bb25353c6 to your computer and use it in GitHub Desktop.
Save cawel/678a84f5387bb25353c6 to your computer and use it in GitHub Desktop.
blog-quiz-easy-4
irb(main):001:0> 3.to_i
=> 3
irb(main):002:0> Integer(4)
=> 4
irb(main):003:0> "not_an_int".to_i
=> 0
irb(main):004:0> Integer("not_an_int")
ArgumentError: invalid value for Integer: "not_an_int"
from (irb):4:in `Integer'
                from (irb):4
                from :0
irb(main):005:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment