From: Gregory Seidman Date: 2008-09-10T23:10:01+09:00 Subject: Re: Please explain that On Wed, Sep 10, 2008 at 10:24:18PM +0900, Jan Pilz wrote: > Can you please explain this behaviour ? > > irb(main):017:0> 071.to_s > => "57" > irb(main):018:0> 71.to_s > => "71" > > Why is an octal Number converted to decimal when outputted as String ? Check the docs for Fixnum#to_s. It takes a base argument, which defaults to 10. Also, I'll point out that a number isn't octal or decimal or anything else. It can be represented in whatever base, but it's just a number. --Greg