From: Austin Ziegler Date: 2003-12-10T23:21:20+09:00 Subject: Re: ruby 1.8.0: Error on "%02d" % "08" or "%02d" % "09" On Wed, 10 Dec 2003 22:17:06 +0900, Thomas Link wrote: > I'm using ruby 1.8.0 (Win native and cygwin version). These two commands > "%02d" % "08" > "%02d" % "09" > result in the error > `%': invalid value for Integer: "08" (ArgumentError) irb(main):003:0> "%02d" % 08 SyntaxError: compile error (irb):3: Illegal octal digit from (irb):3 Leading zeros have a special meaning with integer values. I'm not really sure of a way around this, especially if the numbers come from outside of your program. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.12.10 * 09.15.45