On Feb 24, 2007, at 2:33 PM, Sharma C. wrote:
as humans ignore any number of zeros before. why did ruby compiler
concerned abt it?. why this?. needs a fix to compiler
I think the problem is that floating point literals must be written
in base 10, unlike integer literals which can be written in octal.
In your case:
the parser sees “00” as as 0 written as an octal constant. The parser
doesn’t consider it as the start of a floating point value because
floating point values must be written in decimal. So after parsing
the “00” as an integer literal it sees “.1” as a no longer supported
floating point literal and complains.