Hi,

In message "Confusion on Keywords"
    on 02/10/03, William Djaja Tjokroaminata <billtj / z.glue.umd.edu> writes:

|Now, the remaining problem must be in calling a method named "class" such
|as
|
|    anObject.class
|
|However, it was also written that
|
| "$if" is not a keyword at all, just like "_if" or "aif" is not a keyword.
|
|Therefore, I guess "anObject.class" is not a keyword either.  During
|lexing and parsing, when seeing "$class", the Ruby parser must see the
|leading "$" and says something like "the rest must be just a string
|representing the name of the global variable (not a keyword)".
|
|Therefore, when the Ruby parser sees "anObject.class" and sees the dot,
|and after deciding that it is a form of method call of an object (and not
|a floating point, for example), it must say something like "the string
|before the dot must be the variable name, and the string after the dot
|must be the method name (not a keyword)", and then the interpreter
|dereferences the variable name to get the object, and then calling
|something like
|
|    rb_funcall (anObject_ref, rb_intern ("class"), 0);
|
|That's why I don't understand why the method name "class" didn't work back
|then.  Can anyone help here?

It's simply because lexer did not treat identifiers after dots
specially back then.

							matz.