From: Rick DeNatale Date: 2008-05-27T21:12:53+09:00 Subject: Re: Directionality of comparasion operators On Tue, May 27, 2008 at 7:34 AM, Tobias Weber wrote: > Hi, > maths says that the value of expressions like x == y and y == x is > always equal. And indeed most programmers wouldn't think twice about > using x < y instead of y > x (except maybe those versed in machine > language...). > > But direction does matter in ruby, where operators are just messages > sent to the left operand. This often bites me when using ===. === is not, and is not intended to be the same as ==, nor is it intended to be symmetrical. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/