I'm trying to read data from a text file and join it with a post string. When there's only one line in the file, it works fine. But with 2 lines, my request is failed. Is each_line reading the line break? How can I correct it?
File.open('sfzh.txt','r'){|f| f.each_line{|row| send(row) } I did bypass this issue with split and extra delimiter. But it just looks ugly.