David A. Black wrote: > On Sun, 23 Sep 2007, SpringFlowers AutumnMoon wrote: >> if 3.in [3,2,1] > > The include? way is the usual way. Hal Fulton at one point proposed an > in or in? method that would essentially be: > > class Object > def in?(collection) > collection.include?(self) > end > end > > but I don't think it's on the radar for being added. Hm... wouldn't that be handy... i just sort of think that, if you ask me, "have you been to [Hawaii, China, France]", i probably should be able to look at each one and tell you an answer of yes or no, instead of asking [Hawaii, China, France] to tell whether they have seen me. -- Posted via http://www.ruby-forum.com/.