Posted By

tonic on 06/20/08


ruby line split

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


String split by line

 / Published in: Ruby

  1. text_with_lines.each do |line|
  2. p line.chomp
  3. end

Report this snippet  


RSS Icon Subscribe to comments
Posted By: whistler on April 13, 2011

how about this:
codewithlines.each_line do |line| puts line end

You need to login to post a comment.