Not sure it's a "problem". If you prepend a number with "0" is a 8-base 
number. Always was and always will be.

- Aleksey

On Wednesday, September 14, 2011 1:36:51 AM UTC+3, malclocke wrote:
>
> On Tue, Sep 13, 2011 at 11:40:39PM +1000, Andrew Grimm wrote:
> > On recent versions of Ruby, you can get around that by specifying the 
> base:
> > 
> > Integer("031",10)
> >  => 31
>
> I ran into exactly the same problem with Javascript a couple of days ago
>
>   parseInt("09");
>    => 0
>   parseInt("09", 10);
>    => 9
>
> Malc
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rails-oceania/-/L80efu70mBQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to