Sha256: f2ddbd3d835570d02cb10fff3a1d0c7c822e42191fdc0242a270a45491c57bfc
Contents?: true
Size: 377 Bytes
Versions: 2
Compression:
Stored size: 377 Bytes
Contents
module Enumerable def sort_for doble = self.dup for i in 0...doble.size do for j in 0...doble.size do if doble[i] < doble[j] doble[i], doble[j] = doble[j], doble[i] end end end doble end def sort_each doble = self.dup doble.each_index{ |i| doble.each_index{ |j| doble[i], doble[j] = doble[j], doble[i] if doble[i] < doble[j] } } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alimento-alu0100965667-0.1.1 | lib/alimento/enumerable.rb |
alimento-alu0100965667-0.1.0 | lib/alimento/enumerable.rb |