If you can modify second_name, you could do this (but using zip is the obviously what you should be using): first_name.map { |f| "#{f} #{second_name.shift}" }.
I like this method. I tried with zip method not know with transonse can be possible. Sawa you are great. Your answers are always unique and let me learn new trick everytime. I m big fan of u ;)
2
You can try this also:
full_name = [];
first_name.each_with_index {|x, i| x + second_name[i]}
second_name, you could do this (but usingzipis the obviously what you should be using):first_name.map { |f| "#{f} #{second_name.shift}" }.