Tim Kuntz wrote: > The Ruby doc states the following for a String#=~ > > "cat o' 9 tails" =~ '\d' #=> nil > > When I run what looks like the same command, I get the following error. > > irb(main):001:0> "cat o' 9 tails" =~ '\d' > TypeError: type mismatch: String given > from (irb):1:in `=~' > from (irb):1 > > I have tried this on a couple of different environments but always > Ruby 1.8.4. Can anyone provide me with any insight as to why I don't > get the nil return value? > > tim "cat o' 9 tails" =~ /\d/ -- Posted via http://www.ruby-forum.com/.