If I have an instance of small ruby class with 2 instance variables
and I view it in the debugger I get:

"<MyTest:0x2a47188  @myotheritem=12, @myitem=10>"
however if 

I enter "v i obj" ( view instance variables of obj ) I get
 @myitem => nil
 @myotheritem => nil


On closer inspection debug.rb is calling obj.inspect to get
"<MyTest:0x2a47188  @myotheritem=12, @myitem=10>". When viewing the
instance variables the following code is run:

ary = obj.instance_variables
ary.sort!
for v in ary
   stdout.printf "  %s => %s\n", v, eval(v, binding).inspect
end

so its calling eval on @myitem which of course will fail as @myitem is
an instance variable of obj.

my question is how do I access @myitem in a fully qualified way ie
obj.@myitem ? ( which gives me a parse error )

can I do this or can I only access instance variables via accessors ?
If the above is true then how does inspect pull out the value
correctly.

please let me know if I'm missing somthing obvious. I've been scouring
pickake to no avail

Ian

here is the simple code I was testing against

class MyTest
	def initialize()	
		@myitem = 10
		@myotheritem = 12
	end
	def myitem
		@myitem
	end
	def myitem=(newitem)
		@myitem = newitem
	end
end

obj= MyTest.new()
puts obj.myitem