From: "Jesús Gabriel y Galán" Date: 2010-08-09T15:16:41+09:00 Subject: Re: Need help passing variable to Net::HTTP On Mon, Aug 9, 2010 at 4:18 AM, Samuel Sternhagen wrote: > I have used Net::HTTP like this: > > Net::HTTP.get 'google.com', '/index.html' > > I would like to pass it a variable instead. You already got your answer, but I wanted to point out that: > irb(main):001:0> require 'net/http' > => true > irb(main):002:0> url = String.new > => "" You don't need to do this, since you are assigning a new value to the url variable just below. You are creating an object that you don't use at all. > irb(main):003:0> url = "'google.com', '/index.html'" > => "'google.com', '/index.html'" Jesus.