From: Wes Gamble Date: 2006-08-19T01:39:51+09:00 Subject: Bug in sprintf? All, Why does this fail? irb(main):009:0> sprintf("%d", '08') ArgumentError: invalid value for Integer: "08" from (irb):9:in `sprintf' from (irb):9 I assume it's because the 08 is being as an octal number prior to being changed to a decimal. 01 - 07 work fine, 09 breaks. But I'm telling sprintf to interpret it as decimal, so why can't I have leading zeroes? Please explain to me how this is expected behavior. Thanks, Wes -- Posted via http://www.ruby-forum.com/.