From: ts Date: 2003-06-25T20:41:17+09:00 Subject: Re: protect parents from children >>>>> "S" == Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> writes: S> Is it possible to make the variable readonly to the child ? I still don't know what is a child, and what you want to do Guy Decoux svg% cat b.rb #!./ruby class A def initialize @_a = [1, 2] end def show p "A : #{@_a.inspect}" end end class B < A def initialize @_a = 12 super end def show p "B : #{@_a.inspect}" super end end B.new.show svg% svg% b.rb "B : 12" "A : [1, 2]" svg%