On 18 Mar 2009, at 16:25, Robert Klemme wrote:
> 2009/3/17 Eleanor McHugh <eleanor / games-with-brains.com>:
>>        spaces = /\s+/
>>        chars = /[^A-Za-z0-9\s]/
>
> This is generally less efficient and AFAIK there are no memory leaks
> attached to this.  It's a different story with varying regular
> expressions (i.e. based on input or configuration).  But in this case
> I'd leave them in place.

Interesting, I'll have to do some tests to see what the difference is  
in practice as this is a code pattern I use a lot.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason