From: ts Date: 2002-09-12T15:07:29+09:00 Subject: Re: private variables >>>>> "C" == Christoph writes: C> - this also makes Guy's ``attr_reader problem'' obsolete? attr_reader (or attr_accessor) is not a problem : you can always check if the name of the attribute is private or not. For example you have in eval.c rb_attr(klass, id, read, write, ex) VALUE klass; ID id; int read, write, ex; { const char *name; char *buf; ID attriv; int noex; [...] name = rb_id2name(id); [...] Just add if (rb_is_private_id(id)) { rb_raise(rb_eArgError, "private variable ... "); } name = rb_id2name(id); Guy Decoux