True.not

Why is the following not valid:
(some boolean expression).not
true.not

Mikkel

Hi Mikkel,

I think it is simply because “not” is not a method, but instead a pure
operator. (For example, see Table 18.4 in the Pickaxe book).

(Well, although Ruby is pure OO, it still has both methods and operators.)

Regards,

Bill

···

==========================================================================
MikkelFJ mikkelfj-anti-spam@bigfoot.com wrote:

Why is the following not valid:
(some boolean expression).not
true.not

Mikkel

Why is the following not valid:
(some boolean expression).not
true.not

Mikkel

It doesn’t appeal to me, and I see no need for it to be included as OO purism.
If such were required, I think (True|False)Class.inverse would fit the bill,
but I don’t see it soving any problems.

Gavin

···

From: “MikkelFJ” mikkelfj-anti-spam@bigfoot.com