lib/grape/app.rb in grape-app-0.10.0 vs lib/grape/app.rb in grape-app-0.10.1
- old
+ new
@@ -60,10 +60,10 @@
@root ||= Bundler.root.dup
end
# @return [ActiveSupport::StringInquirer] env name
def env
- @env ||= ActiveSupport::StringInquirer.new(ENV['GRAPE_ENV'] || ENV['RACK_ENV'] || 'development')
+ @env ||= ActiveSupport::StringInquirer.new(ENV.fetch('GRAPE_ENV') { ENV.fetch('RACK_ENV', 'development') })
end
# @return [Zeitwerk::Loader] loader
def loader
@loader ||= Zeitwerk::Loader.new.tap do |l|