Created
May 16, 2016 13:33
-
-
Save chuck0523/026445664f9e7946831df97b69b00e35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array = [1, 2, 3] | |
puts [1, 1, 1].inject(array) {|sum_array, a| sum_array << a} | |
# [1, 1, 1, 1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment