From: Stuart Morrison Date: 2012-05-14T20:50:07+09:00 Subject: Accessing child variables Hi I am learning ruby and I am trying to access variables from a child object. Can anyone help me access the following variable please? class A attr_accessor :valA end class B attr_accessor :myarray def initialize @myarray = [] end def myarray @myarray = myarray end end #end Class class My_top attr_accessor :c c = B.new objA = A.new objA.valA = 10 c.myarray << objA end my_top = My_top.new puts my_top.c.myarray.inspect My error is as follows: stack level too deep (SystemStackError) -- Posted via http://www.ruby-forum.com/.