Topic: Question on the Bang (!)

I've been trying to find out what this does in Ruby. I know it as a Not operator but recently I've seen it used in front of an object to return a boolean.

any help is appreciated.

dave

Last edited by engineerDave (2010-07-19 18:43:10)

"If I'd asked my customers what they wanted, they'd have said a faster horse." - Henry Ford

Re: Question on the Bang (!)

Dave Thomas wrote:

Ruby has a simple definition of truth. Any value that is not nil or the constant false is true.

Does this answer the question?

Re: Question on the Bang (!)

Yup. Thanks!

"If I'd asked my customers what they wanted, they'd have said a faster horse." - Henry Ford