From: "Hal E. Fulton" Date: 2003-08-12T03:29:57+09:00 Subject: Re: ruby 1.8.0 and =~ ----- Original Message ----- From: "Mark Probert" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Monday, August 11, 2003 1:19 PM Subject: ruby 1.8.0 and =~ > > Hi, rubyists. > > I have been out of it for a bit and have just started plating with 1.8.0. > > I notice a new warning around =~ > "warning: string =~ string will be obsolete; use explicit regexp" > > Can someone please tell me the easy way to redo the following? > > arr.each { |item| > if item =~ /blah/ > info = item.split(/:/) > @store[key] = "#{val}:#{info[1].strip}:" > end > } No need to redo that one... the item on the right of =~ is a regex, not a string. Hal