From: Pito Salas Date: 2007-08-17T00:09:04+09:00 Subject: Subject: What *exactly* does an instance variable in the top level do / mean? --Apple-Mail-6-663832666 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Here's an example: --------------- @tl_instance = "hello ruby" puts @tl_instance def tl_method puts "from tl_method -- @tl_instance: #{@tl_instance}" end tl_method class Tl_class def tlc_method puts "from tlc_method -- @tl_instance: #{@tl_instance}" end end Tl_class.new.tlc_method ------------ In tlc_method, I am unable to access @tl_instance. Presumably because it's an instance variable in some other class not Tl_class. But who's instance variable is it? Kernel? If so, how do I access it? -------------------------------------------------------- Check out this nifty blog reader: http://www.blogbridge.com/look --Apple-Mail-6-663832666--