なんとな~くしあわせ?の日記

「そしてそれゆえ、知識そのものが力である」 (Nam et ipsa scientia potestas est.) 〜 フランシス・ベーコン

不思議なRuby

Rubyを練習がてら使おうとしているのだが不思議な現象に出くわした

["Ruby" "is" "wonder" "?"].each { |str|
    print(str, "\n")
}

[ 0,1,'A','B'].each { |x|
    puts x
}

これを実行すると以下の出力が得られる

Rubyiswonder?
0
1
A
B

[Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ


何故か文字列が結合されて一列になってしまう??


追記:
Javaを使いすぎてバカになっていた、コンマが抜けてるだけだ

["Ruby", "is", "wonder", "?"].each { |str|
    print(str, "\n")
}

[ 0,1,'A','B'].each { |x|
    puts x
}