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

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
rohit 2010-06-22 18:45:58 +05:30 committed by José Valim
parent 9be0b50962
commit 40bf76165c
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ begin
$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)