aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/runner
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-08-22 21:26:06 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-08-22 22:39:03 +0300
commitcffb9bc1f64f314e794833b17d68c43e88f47741 (patch)
treee996af559dded47e06bf7033ff884a12c4d39532 /railties/lib/rails/commands/runner
parent9136bb77a73a9374078f850af056225172f1f211 (diff)
downloadrails-cffb9bc1f64f314e794833b17d68c43e88f47741.tar.gz
rails-cffb9bc1f64f314e794833b17d68c43e88f47741.tar.bz2
rails-cffb9bc1f64f314e794833b17d68c43e88f47741.zip
Use `say`/`error` instead of `puts`/`$stderr.puts`
Follow up 44007c07098a3c633180881cae9285da4622e63f
Diffstat (limited to 'railties/lib/rails/commands/runner')
-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