From 9ed5be9dcfa4758dbe0773cf8bb37ebe38528933 Mon Sep 17 00:00:00 2001 From: Nathan Esquenazi Date: Tue, 30 Apr 2024 10:19:37 -0700 Subject: [PATCH] Update server.rb Fix nil rack_options by defaulting to {} --- padrino-core/lib/padrino-core/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/padrino-core/lib/padrino-core/server.rb b/padrino-core/lib/padrino-core/server.rb index dd4fbc061..bf27d7a76 100644 --- a/padrino-core/lib/padrino-core/server.rb +++ b/padrino-core/lib/padrino-core/server.rb @@ -21,7 +21,7 @@ def self.detect_application(options) config_file ||= default_config_file fail "Rack config file `#{config_file}` must have `.ru` extension" unless config_file =~ /\.ru$/ rack_app, rack_options = Rack::Builder.parse_file(config_file) - [rack_app, rack_options.merge(options)] + [rack_app, (rack_options || {}).merge(options)] else [Padrino.application, options] end