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:
parent
9be0b50962
commit
40bf76165c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue