Skip to content

Commit

Permalink
Rails Runner now sets $0 and $PROGRAM_NAME to name of file being run [#…
Browse files Browse the repository at this point in the history
…2244 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
rohitarondekar authored and josevalim committed Jun 22, 2010
1 parent 9be0b50 commit 40bf761
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions railties/lib/rails/commands/runner.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 40bf761

Please sign in to comment.