On Wed, Dec 04, 2002 at 12:29:23AM +0900, Shannon Fang wrote:
> >
> >myarray.select{ |x| x % 2 == 1 }.collect{ |x| x + ", " }  #.join here ?
> 
> Again, can we use Enumerable method on Array? And, { |x| x % 2 == 1} will 
> compare the element itself, not the index of the element, right?

The answer is 'yes' in both cases.
(was too literal :)

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Never make any mistaeks.
	-- Anonymous, in a mail discussion about to a kernel bug report