--XlS4q8O07AKt4+K1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable gabriele renzi (surrender_it / rc1.vip.ukl.yahoo.com) wrote: > il Tue, 18 May 2004 17:15:26 -0400, "Richard Lionheart" > <NoOne / Nowhere.com> ha scritto:: > > >Hi, > > > >I can't find anything in Programming Ruby to suggest why zero is treateds > >true, as happens in lines and 12 in the following toy program. Is it > >perhaps because Ruby has no boolean type, so zero gets converted to a > >string, or something? Aside from an explantion, can you cite a relevant > >page in the Thomas&Hunt book? > > don't know the page, but you can safely assume that every object is > true in ruby, excluding nil and false. And, well, false and true seem > booleans to me :) Also of note are the methods #nil? and #zero? Naturally the later only works on Numerics. -- Eric Hodel - drbrain / segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --XlS4q8O07AKt4+K1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQFAqq+aMypVHHlsnwQRAky6AJ4wEZ7YJOmWN1+dHh+fwRHXJvWFtQCgxJin uDA1C6tOGSfazIcVc35bUSwǣt -----END PGP SIGNATURE----- --XlS4q8O07AKt4+K1--