Skip to content

Instantly share code, notes, and snippets.

@runpaint
Created September 4, 2009 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runpaint/181070 to your computer and use it in GitHub Desktop.
Save runpaint/181070 to your computer and use it in GitHub Desktop.
%w{a b}.each do |name|
File.open(name,'w') do |f|
10000.times {|n| f.puts n }
end
end
a = File.open('a')
b = File.open('b')
a.reopen(b)
a.gets
a.reopen(b)
p a.gets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment