Ruby unpack array to block
arrays, multidimensional-array, ruby
Solution
Your first example works because Ruby will destructure block arguments. See this archived article for more information on destructuring in ruby.
Problem
``` settings = [ ['127.0.0.1', 80], ['0.0.0.0', 443] ] ``` How can I do: ``` settings.each do |ip, port| ... end ``` Instead of: ``` settings.each do |config| ip, port = *config ... end ```