From: Edward Faulkner Date: 2005-10-27T04:45:40+09:00 Subject: Re: how private is private in ruby? --BRE3mIcgqKzpedwo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 27, 2005 at 04:32:36AM +0900, Peter Ertl wrote: > Why is this allowed / possible? > $ puts ks.send(:key) > > so I can just use [public] for _everything_ as well, right? While it may or may not be a good idea that #send subverts access control, your choice of example betrays a misunderstanding of the meaning of "private". "private" is not intended as a security measure. It's an encapsulation technique. You'll find this is generally true in other languages as well. You can certainly subvert "private" in C++. "private" exists only to tell other programmers which methods they really shouldn't be calling. =20 regards, Ed --BRE3mIcgqKzpedwo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDX9w/nhUz11p9MSARAoseAKDJs++0QGFFQNAFdi09ZtjC5G9v5QCfeXDA cgwtpmBtEyFhkla6OMp+Bvk= =sHvJ -----END PGP SIGNATURE----- --BRE3mIcgqKzpedwo--