From: Dhruva Sagar Date: 2010-10-18T01:22:09+09:00 Subject: Re: simple question: pointer equivalent in ruby --00221532cf4483e19b0492d258c6 Content-Type: text/plain; charset=UTF-8 Well generally for such situations you create setters, the example you gave includes only a getter. def method=(val) @value = val end that will then allow you to do method = 3 & that will in turn set @value to 3. Although I don't see what exactly you wanted to know or what you're example had to do with pointers... -- Thanks & Regards, Dhruva Sagar. On Sun, Oct 17, 2010 at 21:29, Shea Barton wrote: > learned ruby a few months ago - is there a pointer equivalent in ruby > for setting the variable referenced by the return value of a function, > rather than just getting it? > > like something that would allow you to do this. > > def method > @value > end > > @value = 5 > method = 3 > @value (should be 3) > > -- > Posted via http://www.ruby-forum.com/. > > --00221532cf4483e19b0492d258c6--