From: Trans Date: 2007-11-14T01:52:09+09:00 Subject: Re: Handy method Object#in? On Nov 13, 10:35 am, Kamil wrote: > I wish there would be this simple method in the core: > > class Object > def in?(an_array) > an_array.include?(self) > end > end > > Having that it's nice to write: > > a = %w(hello world out there) > puts 'world'.in?(a) concise, but it inverts the oop flow. is it really a big deal to do: a.include?('world') t.