From: Wes Gamble Date: 2006-08-19T02:27:25+09:00 Subject: Re: Bug in sprintf? Thanks for the comprehensive response. Well, I can't really argue with the C implementation, of course... BUT it feels like if I declare my intent to interpret the sprintf input as a _decimal_ number with %d (there's a %o if I wanted octal), that is should allow for leading zeroes. My intent in writing sprintf("%d", '08') is to say take the string 08 and turn it into the number 8. It isn't to say here's an octal number, please convert it to decimal for me. If I think the string is octal, I'll use %o for that. So in the spirit of what the user expects, I still think this smells bad. Feel free to convince me otherwise. Thanks again, Wes -- Posted via http://www.ruby-forum.com/.