Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ignore defined but empty ENV['PORT']

  • Loading branch information...
commit 824fe5c752bebd8a5de30a934bc9852341d2b854 1 parent 96da46c
noxqsgit authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sinatra/base.rb
View
2  lib/sinatra/base.rb
@@ -1795,7 +1795,7 @@ class << self
set :running, false # is the built-in server running now?
set :server, %w[HTTP webrick]
set :bind, Proc.new { development? ? 'localhost' : '0.0.0.0' }
- set :port, Integer(ENV['PORT'] || 4567)
+ set :port, Integer(ENV['PORT'] && !ENV['PORT'].empty? ? ENV['PORT'] : 4567)
ruby_engine = defined?(RUBY_ENGINE) && RUBY_ENGINE
Please sign in to comment.
Something went wrong with that request. Please try again.