提交 40bf7616 编写于 作者: R rohit 提交者: José Valim

Rails Runner now sets $0 and $PROGRAM_NAME to name of file being run [#2244 state:resolved]

Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 9be0b509
......@@ -44,6 +44,7 @@
$stderr.puts "Run '#{$0} -h' for help."
exit 1
elsif File.exist?(code_or_file)
$0 = code_or_file
eval(File.read(code_or_file), nil, code_or_file)
else
eval(code_or_file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册