aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/runner/runner_command.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/runner/runner_command.rb b/railties/lib/rails/commands/runner/runner_command.rb
index 27666c76b7..4989a7837d 100644
--- a/railties/lib/rails/commands/runner/runner_command.rb
+++ b/railties/lib/rails/commands/runner/runner_command.rb
@@ -14,7 +14,7 @@ module Rails
"#{super} [<'Some.ruby(code)'> | <filename.rb>]"
end
- def perform(code_or_file = nil)
+ def perform(code_or_file = nil, *file_argv)
unless code_or_file
help
exit 1
@@ -27,6 +27,7 @@ module Rails
if File.exist?(code_or_file)
$0 = code_or_file
+ ARGV.replace(file_argv)
Kernel.load code_or_file
else
begin