diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-25 00:00:08 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-25 00:00:08 +0900 |
commit | 8ace8c76a4d90cca29ede40dbc7f81351eb2e137 (patch) | |
tree | d00d0c973c1b4edfb5c2e9ae585b7382b095f807 /railties | |
parent | 3a628b9338c436001c00a9865b22036abd44a2bd (diff) | |
download | rails-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')
-rw-r--r-- | railties/lib/rails/command.rb | 2 |
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. |