From: Brian Candler Date: 2004-10-09T18:27:36+09:00 Subject: Re: ANN: Free-form-operators patch On Sat, Oct 09, 2004 at 12:59:40PM +0900, Jim Weirich wrote: > (C) is illegal (but I'm not sure why) > ! ~~1 is legal, but !~~1 gives strange results > try: ruby -e '!~~1' and see for yourself. !~ is a binary operator; "a !~ b" expands to "not (a ~= b)", in the same way that "a != b" expands to "not (a == b)" I can't see any useful way to use the construct a !~ (~b) with the standard classes though. e.g. ~/bar/ matches /bar/ against $_, but returns an integer or nil. Regards, Brian.