From: David Vallner Date: 2006-11-04T04:46:01+09:00 Subject: Re: Output not clear --------------enigC39B6016133046AEAA8D0D05 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Learning Ruby wrote: > One more related thing that > confuses me > is that I thought all instance variables of a class are private to the > class. Then are the private instance variables inherited by a sub-class= ? If > yes, then in my Accounts program, there is no real need to the write th= e > attr_accessor statement? >=20 That's a ruby idiosyncratism. Access restrictions operate on an object level, not a class level. (It's also simpler to implement for instance variables.) David Vallner --------------enigC39B6016133046AEAA8D0D05 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFS5x0y6MhrS8astoRAoUKAJ96kEuuGT6HoSsR/19l/iThBWj81QCfXyOa nWLiNvJO6S+7v52kbmVFhiM= =D/vE -----END PGP SIGNATURE----- --------------enigC39B6016133046AEAA8D0D05--