Project

General

Profile

Bug #2067 » open_uri_bug.rb

takeru (takeru sasaki), 09/09/2009 05:27 PM

 
require "pp"
require "open-uri"

p [RUBY_VERSION,RUBY_PATCHLEVEL,RUBY_RELEASE_DATE,RUBY_PLATFORM]
pid = Process.pid
puts "pid=#{pid}"

url = "http://ssktkr.com/asdf"

puts "before -----------------------------"
puts `lsof -p #{pid}`
10.times do
begin
open(url) do |f|
p f
end
rescue => e
p e
pp e.backtrace
end
end
puts "after -----------------------------"
puts `lsof -p #{pid}`

(1-1/3)