aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/runner/runner_command.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-08-23 11:02:15 +0200
committerGitHub <noreply@github.com>2018-08-23 11:02:15 +0200
commit2a321bff402bd990558b8a303f7168b5c4bcfc1d (patch)
treefaf9a1894acbdc09ef8de0580e8e1b9cfcd39cc6 /railties/lib/rails/commands/runner/runner_command.rb
parentdc001dbd58cde8b2caab42ab1bcdd88774818c53 (diff)
parentcffb9bc1f64f314e794833b17d68c43e88f47741 (diff)
downloadrails-2a321bff402bd990558b8a303f7168b5c4bcfc1d.tar.gz
rails-2a321bff402bd990558b8a303f7168b5c4bcfc1d.tar.bz2
rails-2a321bff402bd990558b8a303f7168b5c4bcfc1d.zip
Merge pull request #33696 from bogdanvlviv/follow-up-44007c070
Use `say`/`error` instead of `puts`/`$stderr.puts`
Diffstat (limited to 'railties/lib/rails/commands/runner/runner_command.rb')
-rw-r--r--railties/lib/rails/commands/runner/runner_command.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/lib/rails/commands/runner/runner_command.rb b/railties/lib/rails/commands/runner/runner_command.rb
index 30fbf04982..cb693bcf34 100644
--- a/railties/lib/rails/commands/runner/runner_command.rb
+++ b/railties/lib/rails/commands/runner/runner_command.rb
@@ -10,7 +10,7 @@ module Rails
no_commands do
def help
super
- puts self.class.desc
+ say self.class.desc
end
end
@@ -39,11 +39,11 @@ module Rails
else
begin
eval(code_or_file, TOPLEVEL_BINDING, __FILE__, __LINE__)
- rescue SyntaxError, NameError => error
- $stderr.puts "Please specify a valid ruby command or the path of a script to run."
- $stderr.puts "Run '#{self.class.executable} -h' for help."
- $stderr.puts
- $stderr.puts error
+ rescue SyntaxError, NameError => e
+ error "Please specify a valid ruby command or the path of a script to run."
+ error "Run '#{self.class.executable} -h' for help."
+ error ""
+ error e
exit 1
end
end