From: William Djaja Tjokroaminata Date: 2002-10-15T01:17:59+09:00 Subject: Re: Referring to instance vars in a Struct? Hi Chris, I am not pretty sure, but by drawing analogy between C++ struct and class, I think if you want to add method, it is probably more conventional to use a class instead of a struct. Is there any reason why you don't want to create a TestMe class instead of a TestMe struct? Probably just the amount of typing? Or for efficiency reason, do you think? Regards, Bill =========================================================================== Chris Morris wrote: >> class TestMe >> def show_hey >> puts @hey >> end >> end > Ah, well -- change above to this: > class TestMe > def show_hey > puts hey > end > end > .. and it works fine. Still, I'd expect to be able to use @hey. > Chris