Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   splat operator Question. (http://www.velocityreviews.com/forums/t840841-splat-operator-question.html)

Pedro Del Gallego 05-20-2007 11:27 AM

splat operator Question.
 
Hi there. What's the functional difference between

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

and

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

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

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

[1] :

--=20
-------------------------------------
Pedro Del Gallego

Email : pedro.delgallego@gmail.com


Pedro Del Gallego 05-20-2007 11:29 AM

Re: splat operator Question.
 
> This is a user comment in one post [1] in my blog

Sorry, i forget the address

[1] : http://theplana.wordpress.com/2007/0...plat-operator/



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

Email : pedro.delgallego@gmail.com



All times are GMT. The time now is 12:39 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.