From: Paul Brannan Date: 2002-09-20T10:18:28+09:00 Subject: Re: Thoughts on improving usage of Regexp#match On Fri, Sep 20, 2002 at 09:47:34AM +0900, Hal E. Fulton wrote: > class Regexp > alias :oldmatch :match > > def match(str) > result = self.oldmatch(str) > if not result > null = /x/.match("x") # No new > def null.[](index); nil; end > result = null > end > result > end > end This will break the following code: foo = "this is a test" r = /^this will not match$/ if not r.match(foo) then puts "did not match" end Paul