From: Phillip Hutchings Date: 2006-07-21T07:23:17+09:00 Subject: Re: New to Ruby from CF On 7/21/06, Ben V. wrote: > I'm new to Ruby and Rails from Coldfusion, and I am already finding how > much easier Ruby programming is, yet one thing that I haven't quite > figured out how to do in Ruby is to test whether for example, a contains > b. In Coldfusion we did , but I can't seem to find a > CONTAINS() function or operator in Ruby. What would be the Ruby > equivalent of the code above? And How would I test if one var contains > another, or another string? Thanks for your help and time. if a.include? b Check the documentation for Array and Hash. -- Phillip Hutchings http://www.sitharus.com/