Stefan Matthias Aust spake:
> 
> Mark Slagell <ms / iastate.edu> wrote:
> 
> >>  def x(x) @x = x end
> 
> >Well -- I'm sure it was a typo, but the writer would be x=(x), not
> >x(x).  And of course if you wanted to write them out on one line you'd
> >need semicolons.
> >
> >   def x=(x); @x=x; end
> 
> Yes, that was a typo - thanks - and no, you don't need to add
> semicolons.  Ruby is clever enough to know that a new expressions
> starts behind the parameter () and before end, you never need a
> semicolon.
> 

Ah. Something like "def x @x end" gave me a parse error once, so I
thought delimiters were necessary there.  Hadn't thought to put empty
parens in.  Good trick. :-)

  -- Mark