From: Jon Hawkins Date: 2007-08-04T08:32:02+09:00 Subject: Re: pulling specific dup. elements out of an array Chris wrote: > why didn't reject work? > >>> array = ['234234','04593','4098234','0','0','0'] > => ["234234", "04593", "4098234", "0", "0", "0"] >>> array.reject {|e| e == '0' } > => ["234234", "04593", "4098234"] well lemme further explain what im attempting to do and why i couldnt get reject to work right, i need to delete all the 0's in the array then add up those non-zero numbers. with: array.inject(0) {|num, i| num + i}/array.length/1024 #1024 = kilobytes convert so if theres a way to shove reject into that then lemme know ^^ Thanks -Jon -- Posted via http://www.ruby-forum.com/.