编辑代码

text = "123206-29-1
 1024598-01-3"

puts "\"" + text.split("\n").map{|line| line.strip}.join("\",\"") + "\""