Hello there, I just stuck on this. IĄ¨ve been searching the mailing
list and found nothing, so it must be too obvious.
But indeed, how could I get in a method call a reference to the argument
--instead of the value--so I can modify it inside.
def incr(i)
i+=1
end
I guess that something rarely needed because in instance methods you
always get the self reference to modify the reciever but anyway is it
possible to do it?
Ie seen examples where an Array gets modified:
def addElement(anArray, number)
anArray << number
end
(again a silly example, but is it possible in general?)
Thanks in advance
Marc