1行ずつ取得
Top > Ruby [2.2.2] > each_line , lines
test = "acha\nporute\npiipo\n" test.each_line{ |line| p line } # "acha\n" # "porute\n" # "piipo\n" test.each_line{ |line| puts line } # acha # porute # piipo test.lines{ |line| p line } # "acha\n" # "porute\n" # "piipo\n" test.lines{ |line| puts line } # acha # porute # piipo