From: "Mike 1." Date: 2011-02-05T13:17:17+09:00 Subject: variables and scope Hi all, I would be asking my instructor this question be she is not available on the weekends... How do I make "n" available from anywhere inside the class? I need to keep the values in n from call to call. When calling the method "pt", "n" acts as if it was not declared above. I get -1 instead of what I wish for ... 99. Thanks in advance, Mike class Test n=100 def pt puts "hi there" n=-1 end end t = Test.new puts t.pt -- Posted via http://www.ruby-forum.com/.