From: Jim Freeze Date: 2002-09-06T02:55:17+09:00 Subject: Re: $0 == __FILE__ idiom for Unix only? On Fri, Sep 06, 2002 at 02:15:17AM +0900, Laurent Julliard wrote: > I have been using the Ruby idiom 'if $0 == __FILE__ ..... end' for > ages on Linux and now that I have to use some of my scripts on WIndows > it looks like this test doesn't work? > > Is this supposed to work on Unix/Linux only or on all platforms?? > I don't have acess to a windows system, but it works on windows dependening upon how program is called. That is, through ruby myrubyprog.rb or through the autolaunching of .rb files....IIRC. -- Jim Freeze ---------- Programming Ruby def initialize; fun; end A language with class