Robert Klemme wrote:
> This does not work.
> 
> irb(main):003:0> [nil].sort_by {|it| it.send(:length) || 0}
> 
> Kind regards
> 
> robert

According to him, his problem is not the *element* being nil, but the 
*method called upon* returning nil. So yes, this does work for the 
problem he describes.
>> problem arise when one criteria like the user.name is nil

Regards
Stefan

-- 
Posted via http://www.ruby-forum.com/.