Skip to content

Instantly share code, notes, and snippets.

@martinos
Created January 7, 2011 17:26
Show Gist options
  • Select an option

  • Save martinos/769778 to your computer and use it in GitHub Desktop.

Select an option

Save martinos/769778 to your computer and use it in GitHub Desktop.
Strange behaviour of the Integer kernel method.
irb(main):002:0> Integer("01")
=> 1
irb(main):003:0> Integer("02")
=> 2
irb(main):004:0> Integer("03")
=> 3
irb(main):005:0> Integer("05")
=> 5
irb(main):006:0> Integer("06")
=> 6
irb(main):007:0> Integer("07")
=> 7
irb(main):008:0> Integer("08")
ArgumentError: invalid value for Integer: "08"
from (irb):8:in `Integer'
from (irb):8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment