From cffb9bc1f64f314e794833b17d68c43e88f47741 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Wed, 22 Aug 2018 21:26:06 +0300 Subject: Use `say`/`error` instead of `puts`/`$stderr.puts` Follow up 44007c07098a3c633180881cae9285da4622e63f --- railties/lib/rails/commands/runner/runner_command.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'railties/lib/rails/commands/runner') 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 -- cgit v1.2.3