Re: Everything in ruby is an object?



Jano Svitok wrote:
On 6/22/07, Mark Gargan <mark.gargan@xxxxxxxxx> wrote:
types? I've written a small expression filter that retrieves a boolean
expression from the db and I was just wondering if there was a quicker
way of processing it other than a case statement.

Thanks,
Mark.

No. Expressions are not objects. Objects are true and false, and && ||
are methods.
Expressions are series of calls.

I think && is NOT method:
1.try:
class A
def &&
end
end

#parse error, unexpected tANDOP def && ^

2.& is a method,but && is not.because ruby eval method's arg

--
Posted via http://www.ruby-forum.com/.

.