On May 27, 2006, at 12:24 PM, Nick wrote:
> If I use the "class" property as suggested in the warning,
> the code actually fails to compile with the following :
>
> workpad2.rb:3: parse error, unexpected '.'
> 		if(!class.isMatch(input))

You have to write this as:

   if (!self.class.isMatch(input))


The reason is simply because the parser thinks 'class' all by itself  
is an attempt to open a class block as in:

class Foo
   #
end

by using self.class instead the parser sees it as a method call.  It  
is an unfortunate syntax ambiguity that has to be manually  
disambiguated to avoid the error.

Gary Wright