Re: Possible Regexp documentation bug

Ryan Davis <[email protected]> Sun, 15 Jul 2007 14:43:53 -0700
Newsgroups gmane.comp.lang.ruby.documentation
Message-ID <[email protected]>
On Jul 15, 2007, at 11:40 , Chris Wilson wrote:

> I guess that str =~ Regexp.new(Regexp.escape(str)) is correct?

Yes, this is the real bug in the doco. =~ used to be happy with  
strings as patterns and that is no longer the case with 1.8.x. The  
rest of it (associativity and such) is unnecessary.