Mercurial > zeropaste
changeset 71:7bb46d9febad
Ensure we're gsubbing a string.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 04 Oct 2012 10:38:55 +0700 |
parents | 8f0fb869e770 |
children | f43b4d5400ac |
files | app/models/paste.rb |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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