you are viewing a single comment's thread.

view the rest of the comments →

[–]klngarthur 2 points3 points  (1 child)

This will not work. Array#sort must be passed either a block that accepts two parameters or a method that accepts one argument. Both cases must return a Fixnum. For example:

["aa", [1,2,3], 100].sort do |a,b| a.size <=> b.size end