--dBMBt2YGaTHbdllf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hal Fulton (hal9000 / hypermetrics.com) wrote: > I'm thinking (again) about the idiom "if $0 == __FILE__" and > trying to come up with viable alternatives. > > It seems to me that we don't really need an "executable" thing > like exit/break/return/quit in this context. > > It could just be a "marker" as someone suggested. > > My two favorites so far are __TEST__ and __MAIN__. > > As far as I can see, there should be no conflict or interaction > with the __END__ marker. We also discussed on IRC having a "-t" flag to the ruby interpreter that would run a TEST block (like BEGIN or END or at_exit), but __TEST__ seems even better than that. -- Eric Hodel - drbrain / segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --dBMBt2YGaTHbdllf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/13t6MypVHHlsnwQRAsILAKCZWuvrHTcx8J46QV34C5XrVaUUxQCg7U+b Mc5r51OfBQ5soDibUXGXM9k`Qa -----END PGP SIGNATURE----- --dBMBt2YGaTHbdllf--