From: "Jeremy W." Date: 2012-05-14T22:53:27+09:00 Subject: Re: Accessing child variables I would recommend reading a good book on Ruby to understand how attr_accessor and instance variables work. I'd also use more descriptive names when you're trying to learn these concepts. It's much easier to program when thinking in terms of Cars containing Wheels with Types, that it is A with a B, and a objC etc. http://pragprog.com/book/ruby3/programming-ruby-1-9 if a good place to start. The code below works. Good luck! class A attr_accessor :valA end class B attr_accessor :myarray def initialize @myarray = [] end end class My_top attr_accessor :c def initialize objA = A.new objA.valA = 10 @c = B.new @c.myarray << objA end end my_top = My_top.new puts my_top.c.myarray.inspect -- Posted via http://www.ruby-forum.com/.