From: PJ Hyett Date: 2006-03-18T03:05:21+09:00 Subject: Re: Explanation of if __FILE__ == $0 Thanks guys, that's helpful. -PJ On 3/17/06, Jim Freeze wrote: > On Mar 17, 2006, at 10:58 AM, Daniel Harple wrote: > > > if __FILE__ == $PROGRAM_NAME # [1] > > [1] $PROGRAM_NAME is the less cryptic name for $0 > > > > Most definitely. I would like to see this changed in existing code. > > Being a long time Ruby user, I always used $0 until > recently, Then I read some code by a new ruby user (whom I introduced > to ruby). > I never bothered to see if an alternative to $0 existed. > > You can learn from anyone. Even the nubies. :) > > Jim Freeze > > > > >