From: Kevin Smith Date: 2001-09-22T10:05:46+09:00 Subject: [ruby-talk:21513] Re: Replacement for __FILE__ == $0 --- Nathaniel Talbott wrote: > Why? It means one less thing that has to be remembered > (two less things > if you require 'English'). Instead of having to remember > > if __FILE__ = $0 # or $PROGRAM_NAME > > you have just have to remember > > in_main_file { stuff } > I am always reluctant to add new keywords or methods to core classes. Using require 'English' (which I wasn't aware of) is reasonable in this case, although I would argue that $0 is nearly useless as-is, and so should be aliased. Having a perl background shouldn't be a prerequisite for using Ruby. Adding in_main_file increases the total complexity of Ruby, which is already a bit more complex than I would like. Just my own preference. Kevin __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com