From: Todd Benson Date: 2007-11-16T06:39:41+09:00 Subject: Re: (1..5) === 3 > true 3 === (1..5) > false On Nov 15, 2007 3:25 PM, Michael Chow wrote: > (1..5) === 3 > true > 3 === (1..5) > false > > Is this a bug or expected behavior? From my understanding it shouldn't > matter on which side of an equal comparison an expression appears. > -- > Posted via http://www.ruby-forum.com/. It's one of those "you have to read the docs" things. The === method for Range is left-sided because it's a method. You can redefine it if you want. class Range def ===(o) puts o end end (1..5) === 3 # 3 # => nil