From: Harry Kakueki Date: 2007-11-04T13:37:04+09:00 Subject: Re: How do I make variables defined in a method accessible on another method? On 11/4/07, Victor Reyes wrote: > Team, > > I know the reason why it is happening, but I don't know how to access a > variable from another method, if there is a way. class My_Class def initialize(size) @arr = Array.new(size) @ind = 1 end def print_method p @arr p @ind end end my_obj = My_Class.new(10) my_obj.print_method Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/