From: Matthias Reitinger Date: 2006-08-19T02:53:13+09:00 Subject: Re: Bug in sprintf? Carlos wrote: > It is not expected, nor documented, because the documentation of sprintf > says: > d | Convert argument as a decimal number. > > ...which is very explicit in that the argument will be interpreted as a > decimal number, not octal. I disagree on that. %d tells sprintf to expect an Integer as the corresponding argument. Being given a String instead it tries to convert it by calling Kernel#Integer. This fails for the reasons already metioned. Greetings, Matthias -- Posted via http://www.ruby-forum.com/.