dave wrote: >list.delete_if(){|obj| # the list is an array of objects > delete = false # delete the obj from the list > @tokens.each{|t| # tockens is the splitted query > if (! delete) > @func_signs.each_key(){|k| > if (t =~ k) > # the calles function split the tocken and > # return true if the obj satisfies this part of tocken > delete = (! send(@func_signs[k], obj, t)) > end > } > end > } > delete >} > > I didn't test this, so don't assume it works... list.delete_if{|obj| @tokens.any? {|t| @func_signs.any? {|k,v| (t =~ k) && (!send(v, obj, t)) } } } Not sure if that was what you were looking for... Questions? Actually, I've got one. If you do, @func_signs.any? {|kv| ... } Ruby knows to pass the key and value as a single argument - the Array [k,v] - instead of as the two arguments k and v. How? Can I write my own code to do the same? Devin