1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Switch from inject to each in config_ru_binds iteration

This commit is contained in:
Costi 2015-07-29 09:30:21 -05:00
parent 69449dc23a
commit 4308cd84d9

View file

@ -104,9 +104,9 @@ module Puma
rack_app, rack_options = Puma::Rack::Builder.parse_file(rackup)
@options.merge!(rack_options)
config_ru_binds = rack_options.inject([]) do |b, (k, v)|
b << v if k.to_s.start_with?("bind")
b
config_ru_binds = []
rack_options.each do |k, v|
config_ru_binds << v if k.to_s.start_with?("bind")
end
@options[:binds] = config_ru_binds unless config_ru_binds.empty?