# HG changeset patch # User Edho Arief # Date 1349321935 -25200 # Node ID 7bb46d9febadc33340c520d4f0d00456490cb265 # Parent 8f0fb869e7704a8a39403ed618e3dcb640b98fd1 Ensure we're gsubbing a string. diff -r 8f0fb869e770 -r 7bb46d9febad app/models/paste.rb --- a/app/models/paste.rb Thu Oct 04 10:38:08 2012 +0700 +++ b/app/models/paste.rb Thu Oct 04 10:38:55 2012 +0700 @@ -11,7 +11,7 @@ end def convert_newlines - self.paste = self.paste.gsub("\r\n", "\n").gsub("\r", "\n") + self.paste = self.paste.to_s.gsub("\r\n", "\n").gsub("\r", "\n") end def paste_limit