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 03:45 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57