[ruby-talk:00201] Re: execute if called rather than required

From: matz@... (Yukihiro Matsumoto)
Date: 1999-01-20 13:25:02 UTC
List: ruby-talk #201
Hi.

In message "[ruby-talk:00200] execute if called rather than required"
    on 99/01/20, Julian Fondren <julian@imaji.net> writes:

|What is the ruby equivalent of python's
|
|if __name__ == '__main__':

I often use

  if __FILE__ == $0
    ...
  end

for libraries.

In This Thread