Why "system" command does not read Ruby output file?

Oh...

$VERBOSE = true

open "tmp_out.txt", "w" do |file|
  DATA.each do |line|
    _, start, stop = line.split
    (Integer(start)..Integer(stop)).each do |n|
      file.puts n
    end
  end
end

system "sort tmp_out.txt"

···

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