Permalink
Browse files

Made patch more readable thanks to @Ortuna's comment https://github.c…

  • Loading branch information...
dariocravero committed Oct 15, 2013
1 parent 5fe35cc commit 65742092d47d327e0e15ce720d72f0b3b9681928
Showing with 5 additions and 1 deletion.
  1. +5 −1 padrino-core/lib/padrino-core/server.rb
@@ -31,7 +31,11 @@ def self.start(app, opts={})
FileUtils.mkdir_p(File.dirname(options[:pid]))
end
options[:server] = detect_rack_handler if options[:server].blank?
- options.merge!(Hash[*options.delete(:options).map {|opt| opt.split('=',2)}.flatten].symbolize_keys!) if options[:options].is_a?(Array)
+ if options[:options].is_a?(Array)
+ parsed_server_options = options.delete(:options).map { |opt| opt.split('=', 2) }.flatten
+ server_options = Hash[*parsed_server_options].symbolize_keys!
+ options.merge!(server_options)
+ end
new(options, app).start
end

0 comments on commit 6574209

Please sign in to comment.