Skip to content

Instantly share code, notes, and snippets.

@drio
Created January 10, 2009 03:12
Show Gist options
  • Save drio/45362 to your computer and use it in GitHub Desktop.
Save drio/45362 to your computer and use it in GitHub Desktop.
one_f, two_f = File.new("./one.txt", "r"), File.new("two.txt", "r")
one_f.each_line do |l_one|
two_f.each_line do |l_two|
puts "#{l_one} -- #{l_two}"
end
two_f.rewind
end
[ one_f, two_f ].each {|f| f.close}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment