$0
: The name of the top-level Ruby program being executed. __FILE__
: The name of the current source file.$0指当前正在运行的文件,动态的。
__FILE__ 和vc中的一样,指的是当前文件,静态的。
$0
: The name of the top-level Ruby program being executed. __FILE__
: The name of the current source file.