Subject: [ruby-talk:00202] Re: execute if called rather than required
From: shugo aianet.ne.jp (Shugo Maeda)
Date: 20 Jan 1999 22:44:42 +0900
References: 200
In-reply-to: Julian Fondren's message of "Wed, 20 Jan 1999 07:08:20 -0600 (CST)"
Julian Fondren <julian / imaji.net> writes:
> What is the ruby equivalent of python's
>
> if __name__ == '__main__':
Try this:
if __FILE__ == $0
...
end
Shugo