Hi,
0.1.class results in float.
00.1.class results in error?
SyntaxError: compile error
(irb):5: no . floating literal anymore; put 0 before dot
00.1class
^
(irb):5: syntax error
00.1class
^
from (irb):5
as humans ignore any number of zeros before. why did ruby compiler
concerned abt it?. why this?. needs a fix to compiler 
sharma
On Feb 24, 2007, at 2:33 PM, Sharma C. wrote:
00.1class
^
from (irb):5
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:
00.1.class
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.
Gary W.