aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-25 00:00:08 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-05-25 00:00:08 +0900
commit8ace8c76a4d90cca29ede40dbc7f81351eb2e137 (patch)
treed00d0c973c1b4edfb5c2e9ae585b7382b095f807 /railties/lib
parent3a628b9338c436001c00a9865b22036abd44a2bd (diff)
downloadrails-8ace8c76a4d90cca29ede40dbc7f81351eb2e137.tar.gz
rails-8ace8c76a4d90cca29ede40dbc7f81351eb2e137.tar.bz2
rails-8ace8c76a4d90cca29ede40dbc7f81351eb2e137.zip
`DEFAULT_ENV` falls back to `default_env` when `RAILS_ENV` or `RACK_ENV` is an empty string
Follow up of #27399.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index 0d4e6dc5a1..ee020b58f9 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -23,7 +23,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.