From: Lars Christensen Date: 2001-11-01T18:02:31+09:00 Subject: [ruby-talk:24065] Re: private instance_variable? On Thu, 1 Nov 2001, Yukihiro Matsumoto wrote: > In message "[ruby-talk:24047] private instance_variable?" > on 01/11/01, Chochain Lee writes: > > |Is there a way to create a 'private' instance_variable in a base > |class? It seems that all instance variables can at most be 'protected' > |but not 'private'. Extended-class can always modify base-class's > |instance variable either purposely or by side-effect! > > It's in the ToDo list. This is something Python can and Ruby can't. Related to this, will there be private/protected constants? I don't particularly enjoy that this is possible: $ ./ruby -e 'p String::Process::Regexp::Enumerable::IO::String.new("foo")' "foo" -- Lars Christensen, larsch@cs.auc.dk