Created
December 5, 2010 01:05
-
-
Save jwilger/728658 to your computer and use it in GitHub Desktop.
Not sure if this is an interpreter bug or just a misunderstanding on my part.
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
ree-1.8.7-2010.02 > s.each do |x| | |
ree-1.8.7-2010.02 > begin | |
ree-1.8.7-2010.02 > puts '%02d' % x | |
ree-1.8.7-2010.02 ?> rescue ArgumentError => e | |
ree-1.8.7-2010.02 ?> puts e | |
ree-1.8.7-2010.02 ?> end | |
ree-1.8.7-2010.02 ?> end | |
01 | |
02 | |
03 | |
04 | |
05 | |
06 | |
07 | |
invalid value for Integer: "08" | |
invalid value for Integer: "09" | |
10 | |
=> ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment