From: Gary Yngve Date: 2009-02-11T02:29:11+09:00 Subject: Regexp ops: get rid of !=~? --000e0cd2e0827519f1046293d796 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The proper way to see if something doesn't match is "foo" !~ /bar/ The ~/blah/ operator exists to apply to $_ Unfortunately this means that "foo" !=~ /bar/ does "foo".!= (~bar), which doesn't produce an error, even though it's basically garbage. Instead it fails silently by returning true (nil or an number are not strings). Is there a way w/ Ruby to define a mega !=~ operator and either have it do !~ or have it throw an exception? Or an easy way w/ Ruby to have the parser warn about it? Alas google is not good for searching for !=~, so apologies if this has been previously discussed. Thanks, Gary --000e0cd2e0827519f1046293d796--