From: Donglai Gong Date: 2003-07-01T05:36:15+09:00 Subject: why can't I access my instance variables? I'm having trouble accessing instance variables directly. What's wrong with this... class Level1 def initialize @var1='var1 set.' end def printvar1 @var1 end end l1=Level1.new print l1.printvar1, "\n" print l1.var1 I get the following output: % ruby test.rb var1 set. test.rb:13: undefined method `var1' for # (NoMethodError) I'm running version 1.8.0 preview3 on OS X. Donglai