--flDc4cbvG5Y7qIjC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2006.10.27 13:56, Dmitri Priimak wrote: > Eero Saynatkari wrote: > > >Is it possible to change NilClass#to_s to return "nil" > >rather than "" since "" != nil? > > > > > -- test.rb BEGIN > p nil.to_s.nil? > > class NilClass > def to_s > nil > end > end > > p nil > p nil.to_s.nil? > -- test.rb END > > $ ruby test.rb > false > nil > true I should have been clearer. I was wondering if it could be fixed in the language itself :) Thank you though! --flDc4cbvG5Y7qIjC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFQZKU7Nh7RM4TrhIRAmV4AJ9XwE/OchHZggB90B2/g/rb6k+TXwCeJvLw Vv+QnLHwXqKYyi5XT0qe9Yg yt -----END PGP SIGNATURE----- --flDc4cbvG5Y7qIjC--