From: Rick DeNatale Date: 2008-03-24T19:56:50+09:00 Subject: Re: functions, arguments and changing their value permantently On 3/24/08, Adam Akhtar wrote: > Im coming over to Ruby from C++ after a long break from programming. One > thing im having to get used to is how ruby references or points directly > to variables. In C++ I can pass a variable as an argument to a function > and then change the value within the function. This change will be > reflected outside of the function. How do i go about doing this in ruby? Perhaps something here can help you get your head around this aspect of how Ruby isn't C++: http://talklikeaduck.denhaven2.com/articles/2006/09/13/on-variables-values-and-objects http://talklikeaduck.denhaven2.com/articles/2008/02/08/whose-variable-is-it-anyway -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/