参考: http://niku.name/20110520.html
class Array
def sleep_sort(&block)
result = Array.new
self.map {|n|
Thread.start {
sleep n.to_i
yield n if block_given?
result << n
}
}.each(&:join)
result
end
end
ARGV.sleep_sort {|n| puts "*#{n}*" }