fugafuga.write

日々のログ



Ruby: Rangeと配列展開

なんじゃこれと思ったやつ

[7] pry(main)> [1..12]
=> [1..12]
[8] pry(main)> [*1..12]
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]