> 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 ?
Let's take a look at ri Fixnum#to_s:
fix.to_s( base=10 ) -> aString
------------------------------------------------------------------------
Returns a string containing the representation of _fix_ radix
_base_ (between 2 and 36).
Here you have it - default base is 10.
Regards,
Rimantas
--
http://rimantas.com/