Re: Everything in ruby is an object?
- From: gz zz <gpygood@xxxxxxx>
- Date: Fri, 22 Jun 2007 18:16:18 +0900
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/.
.
- Follow-Ups:
- Re: Everything in ruby is an object?
- From: Mark Gargan
- Re: Everything in ruby is an object?
- References:
- Everything in ruby is an object?
- From: Mark Gargan
- Re: Everything in ruby is an object?
- From: Jano Svitok
- Everything in ruby is an object?
- Prev by Date: from the ruby book install on win32
- Next by Date: ruby equivalent of htons or htonl
- Previous by thread: Re: Everything in ruby is an object?
- Next by thread: Re: Everything in ruby is an object?
- Index(es):