Bugs item #4344, was opened at 2006-05-03 16:41
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4344&group_id=426

Category: Core
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Doug Kearns (dkearns)
Assigned to: Nobody (None)
Summary: :!~ not a symbol

Initial Comment:
:!~ is not an instance of Symbol as :=~ is.

irb(main):001:0> :!~.class
SyntaxError: compile error
(irb):1: parse error, unexpected tNMATCH, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
:!~.class
   ^
        from (irb):1

It might just be due to the fact that tNMatch is not included as part of the "op" symbol in parse.y

----------------------------------------------------------------------

Comment By: Nobuyoshi Nakada  (nobu)
Date: 2007-05-10 09:14

Message:
Not a bug.

----------------------------------------------------------------------

Comment By: Murphy (Kornelius Kalnbach) (murphy)
Date: 2006-10-19 07:47

Message:
There are some more operators that aren't methods:

+= -= *= /= **= %=
&= |= ^=
<<= >>=
&&= ||=
!~ != && || .. ... ?:
and or not

So, it's not a bug.

----------------------------------------------------------------------

Comment By: Austin Ziegler (austin)
Date: 2006-05-03 21:12

Message:
I'm not sure that this is a bug. =~ is a legitimate operator, just as == is. != and !~ aren't operators, but are syntactic sugar for !(a == b) and !(a =~ b).

----------------------------------------------------------------------

Comment By: Doug Kearns (dkearns)
Date: 2006-05-03 16:57

Message:
Actually this looks like it might be intentional, if a
little unexpected, since x !~ y is converted to !(x ~= y).

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4344&group_id=426