[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

why the "response" in h.get() ?

Boris \"BXS\" Schulz

11/19/2003 12:26:00 AM

Hi,

I found out, that getting data via
h = Net::HTTP.new(stuff)
resp, data1 = h.get(morestuff)
only works, when the "resp" is there.
Why is that, and what does the notation with the comma (",") mean ?
I own the Ruby In A Nutshell, but it does not help much on this subject.

greetings, BXS

1 Answer

Gennady Bystritsky

11/19/2003 3:31:00 AM

0

Parallel assignment:

a, b = 1, 2 # a==1 b==2
c = [3, 4]
a, b = c # a==3 b==4

http://www.ruby-doc.org/docs/Programming...
tut_expressions.html#UC

Sincerely,
Gennady Bystritsky


On Nov 18, 2003, at 4:22 PM, Boris "BXS" Schulz wrote:

> Hi,
>
> I found out, that getting data via
> h = Net::HTTP.new(stuff)
> resp, data1 = h.get(morestuff)
> only works, when the "resp" is there.
> Why is that, and what does the notation with the comma (",") mean ?
> I own the Ruby In A Nutshell, but it does not help much on this
> subject.
>
> greetings, BXS
>
>