From: "Weirich, James" Date: 2003-09-09T05:04:45+09:00 Subject: Re: Conditional inserts in inject > %w{ one two three }.inject(Array.new) { |a, e| if e != > "three" then a << > e else a end } Since << is a modifying operation, the following also works ... %w{ one two three }.inject(Array.new) { |a, e| a << e if e != "three"; a } -- -- Jim Weirich / Compuware -- FWP Capture Services -- Phone: 859-386-8855