From: Dr Nic Date: 2006-09-28T23:30:29+09:00 Subject: Re: New magical version of Symbol.to_proc Ahh. Removed trace and fixed the regular expression: re = /(map|collect|select|each|reject)_([\\w\\_]+\\??)/ if (match = method.to_s.match(re)) iterator, callmethod = match[1..2] return self.send(iterator) {|item| item.send callmethod} end Now supports reject For example: >> list = [nil, 1, 2, nil, 4] => [nil, 1, 2, nil, 4] >> list.reject_nil? => [1, 2, 4] Cool. -- Posted via http://www.ruby-forum.com/.