From: Wilson Bilkovich Date: 2006-01-02T16:49:03+09:00 Subject: Re: Listing Ruby keywords On 1/2/06, George Ogata wrote: > John Maclean writes: > > > Is there a simple way to find out all or most of the built-in > > keywords? I know that if a keyword's in a ruby script that the > > debugger will tell you but I'd like to know before hand, in other > > words when I'm actually writing the scripts. > > Can't use an editor with syntax coloring? ;-) > > The emacs ruby-mode colors these as keywords: > > "alias" > "and" > "begin" > "break" > "case" > "catch" > "class" > "def" > "do" > "elsif" > "else" > "fail" > "ensure" > "for" > "end" > "if" > "in" > "module" > "next" > "not" > "or" > "raise" > "redo" > "rescue" > "retry" > "return" > "then" > "throw" > "super" > "unless" > "undef" > "until" > "when" > "while" > "yield" > > And these as special variables: > > nil, self, true, false, __FILE__, __LINE__ > > Aside from that I can only think of: > > BEGIN, END, defined? > > You could also try searching the list archives. > > HTH. Or you could make a script that tries to assign to local variables with every possible name combination, and keeps track of which ones throw exceptions. ;)