From: Simon Strandgaard Date: 2004-04-01T12:49:24+09:00 Subject: string !~ string, not possible in cvshead While upgrading and reinstalling misc modules I regulary use, I bumped into this construction. I don't know if the recent switch from GNU to Oniguruma has broken anything ? Any reason that String isn't allowed anymore ? server> ruby a.rb a.rb:1:in `=~': type mismatch: String given (TypeError) from a.rb:1 server> expand -t2 a.rb if "hello" !~ "l{2}" raise end server> Changing right argument into a regexp makes it work. server> ruby a.rb server> expand -t2 a.rb if "hello" !~ /l{2}/ raise end server> ruby -v ruby 1.9.0 (2004-03-31) [i386-freebsd5.1] server> Perhaps change exception message to something else, for instance: in `!~': right argument must be Regexp, but was String (TypeError) That would be less confusing ;-) -- Simon Strandgaard