Created
January 7, 2011 17:26
-
-
Save martinos/769778 to your computer and use it in GitHub Desktop.
Strange behaviour of the Integer kernel method.
This file contains hidden or 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
| 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