Replace text in strings with ruby gsub

1 # data is a hash with strings having \r\n. I want to replace the \r with \n. This is coming from a scrubyt script I was using to scrape content. The content was dirtied with these strange \r's. 
      2 
      3 cutterbutter = data[:body].to_s.gsub("\r","\n")
      4 puts cutterbutter
      

Picture of Scott Motte

delicious facebook rss twitter

Spitfire Sky | github | archives | resume