diff options
author | rohit <rohit.arondekar@gmail.com> | 2010-06-22 18:45:58 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-22 15:20:29 +0200 |
commit | 40bf76165c392a15cd74321dd7d1cbc96c77bd27 (patch) | |
tree | b03471a15d143d5100598fd3a36e12a9778a45ae /railties/lib | |
parent | 9be0b509628388a290b117e6b02df871d97f8c2d (diff) | |
download | rails-40bf76165c392a15cd74321dd7d1cbc96c77bd27.tar.gz rails-40bf76165c392a15cd74321dd7d1cbc96c77bd27.tar.bz2 rails-40bf76165c392a15cd74321dd7d1cbc96c77bd27.zip |
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>
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 278548558e..b97ff086b6 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -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) |