`$0` and `$PROGRAM_NAME`
suggest change$0, also available as $PROGRAM_NAME, is the name of the program being executed. In the file passed to ruby, it starts out equal to __FILE__. Assigning $0 does not change __FILE__, and a file loaded with require has its own __FILE__.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents