From: Gennady Date: 2002-12-20T07:43:38+09:00 Subject: Re: Cannot define constant END Thanks a lot !!! I just checked with pickaxe and found that BEGIN and END declare blocks to be executed on file load and program exit respectively. Sorry for not checking before posting. Gennady. ----- Original Message ----- From: "Daniel Carrera" To: "ruby-talk ML" Sent: Thursday, December 19, 2002 2:34 PM Subject: Re: Cannot define constant END > BEGIN and END are reserved Ruby keywords (like 'if', 'else' and 'while'). > You can't use them for variables. > > You can use '_HOME' and '_END' if you like. > > Daniel Carrera > Graduate Teaching Assistant. Math Dept. > University of Maryland. (301) 405-5137 > > On Fri, 20 Dec 2002, Gennady wrote: > > > I am trying to define a class constant named END like > > > > class Test > > HOME = 0 > > END = 1 > > end > > > > This produces compiler error: > > > > test.rb:3: parse error > > END = 1 > > ^ > > > > Is 'END' a reserved keyword in Ruby ('end' is, i know :-) )? > > > > Thank you, > > Gennady. > > > >