-
-
Save mistyrinth/2b178194d4a8ca2cda569d8e9845eb18 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 = ["醤油", "酢",["塩", "胡椒"], "ポン酢"] | |
puts "元の配列は #{array} です" | |
# 配列の平滑化 | |
newarray = array.flatten | |
puts "置き換えた後の配列は #{newarray} です" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment