From: noreply@... Date: 2006-07-15T09:11:26+09:00 Subject: [ ruby-Bugs-5067 ] open-uri fails under multithreading Bugs item #5067, was opened at 2006-07-14 19:11 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=5067&group_id=426 Category: Standard Library Group: 1.8.4 Status: Open Resolution: None Priority: 3 Submitted By: Cash Erler (olathe) Assigned to: Nobody (None) Summary: open-uri fails under multithreading Initial Comment: The following code gives .../lib/ruby/1.8/open-uri.rb:215:in `open_http': uninitialized constant Net::HTTP (NameError) : require 'open-uri' a = Thread.new { open('http://www.google.com/') } b = Thread.new { open('http://www.google.com/') } a.join b.join Strangely enough, adding require 'net/http' to the top makes it work just fine, though I assume require 'open-uri' is supposed to do that automatically. open-uri seems to work fine other than that. I am using ruby 1.8.4 (2006-04-14) [i386-mswin32] from the one-click installer. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=5067&group_id=426