----- Original Message ----- 
From: "Tobias Reif" <tobiasreif / pinkjuice.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, January 15, 2002 12:58 PM
Subject: Re: how to get all the reserved words?


> What's missing in the following list?
> (considering all versions of Ruby, even planned ones)
> 
>    reserved_words = [
>     'BEGIN',  'END',   'alias',  'and',      'begin',
>     'break',  'case',  'class',  'def',      'defined?',
>     'do',     'else',  'elsif',  'end',      'module',
>     'ensure', 'false', 'for',    'if',       'in',
>     'next',   'nil',   'not',    'or',       'redo',
>     'rescue', 'retry', 'return', 'self',     'super',
>     'then',   'true',  'undef',  'unless',   'until',
>     'when',   'while', 'yield',  '__FILE__', '__LINE__'
>       ]

Here is my list. (I think yours has some that are not
really reserved, such as __FILE__.)

     BEGIN END alias and begin 
     break case class def defined 
     do else elsif end ensure 
     false for if in module 
     next nil not or redo 
     rescue retry return self super 
     then true undef unless until 
     when while yield 

Actually, I'm questioning nil, true, and false also;
but they've been in my list forever. Someone care
to comment?

Of course, even a reserved word isn't really reserved.
For example, you can define a method called "in"
if you wish. It's a matter of context.

Hal