Thanks, now this ok. irb(main):001:0> a = [ 8412478247689, 25977, 88582, 8410347003107 ] => [8412478247689, 25977, 88582, 8410347003107] irb(main):002:0> a.sort => [25977, 88582, 8410347003107, 8412478247689] irb(main):003:0> In my code with "to_i" it's ok: @f.each do |linea| cod, desc = linea.chomp.split(/,/) @array1[i] = [ cod.strip.to_i ] i = i+1 end @asort1 = @array1.sort -- Posted via http://www.ruby-forum.com/.