Toki Toki wrote: > Ok, so this: > > %w[uri net/http].each{|l|require l} > 10.times do > Thread.new > {Net::HTTP.get_response(URI.parse('http://www.google.com/'))} > end > > is equal to this: > > require 'net/http' > require 'uri' > 10.times do > Thread.new > {Net::HTTP.get_response(URI.parse('http://www.google.com/'))} > end Yes. > Good, I've never used require with array. > > But if I run the code above I get an error: url_call.rb:4: odd number > list for Hash > > I think it's because of the curly braces that are viewed like an hash, > right? I don't know how Thread works in Ruby, but it seems that the > statements in the curly braces need to be on the same line as Thread.new > otherwise it give the error above... Thread.new gets a block, so you could as well write the code above as: require 'net/http' require 'uri' 10.times do Thread.new do Net::HTTP.get_response(URI.parse('http://www.google.com/')) end end maybe this is a bit more clear to you?