[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

splat operator Question.

Pedro Del Gallego

5/20/2007 11:28:00 AM

Hi there. What's the functional difference between

pet1, pet2, pet3 = *["duck", "dog", "cat"]

and

pet1, pet2, pet3 = ["horse", "cow", "goat"]

I get the same results–namely, each pet gets one value from the array.

This is a user comment in one post [1] in my blog

[1] :

--
-------------------------------------
Pedro Del Gallego

Email : pedro.delgallego@gmail.com

1 Answer

Pedro Del Gallego

5/20/2007 11:29:00 AM

0

> This is a user comment in one post [1] in my blog

Sorry, i forget the address

[1] : http://theplana.wordpress.com/2007/03/03/ruby-idioms-the-splat...



--
-------------------------------------
Pedro Del Gallego

Email : pedro.delgallego@gmail.com