From: Henry Oss Date: 2010-05-12T05:31:01+09:00 Subject: Re: Super simple newbie Q about methods Alex DeCaria wrote: > > The 'i' in your method is local to the method. It is not the same 'i' > as outside the method. > > Instead, do > > def add(i,j) > i = i + j > end > > i = 1 > > puts i > i = add(i,3) > puts i Thanks for that, but I was looking for a way of passing by address. In fact I thought that, because everything was an object in Ruby everything was always passed by address. I would like to understand when it is not the case. -- Posted via http://www.ruby-forum.com/.