aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/command.rb')
-rw-r--r--railties/lib/rails/command.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index 0d4e6dc5a1..6d99ac9936 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -1,8 +1,9 @@
+# frozen_string_literal: true
+
require "active_support"
require "active_support/dependencies/autoload"
require "active_support/core_ext/enumerable"
require "active_support/core_ext/object/blank"
-require "active_support/core_ext/hash/transform_values"
require "thor"
@@ -10,6 +11,7 @@ module Rails
module Command
extend ActiveSupport::Autoload
+ autoload :Spellchecker
autoload :Behavior
autoload :Base
@@ -23,7 +25,7 @@ module Rails
end
def environment # :nodoc:
- ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
+ ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development"
end
# Receives a namespace, arguments and the behavior to invoke the command.