diff options
author | Saito <saitowu@gmail.com> | 2011-12-01 15:59:49 +0800 |
---|---|---|
committer | Saito <saitowu@gmail.com> | 2011-12-01 15:59:49 +0800 |
commit | 42ba6d04f84b722bc1212378633cd8c05a2c6ded (patch) | |
tree | e538047a1e29d30ef908266c1395e19b142b577e /lib/utils.rb | |
parent | c2cfc52e449a7bcd817909ace4ab8926509ee4f2 (diff) | |
download | gitlab-ce-42ba6d04f84b722bc1212378633cd8c05a2c6ded.tar.gz |
refactor each_line detect to detect all diff file
Diffstat (limited to 'lib/utils.rb')
-rw-r--r-- | lib/utils.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.rb b/lib/utils.rb index d0339c2b271..411abef2f69 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -23,6 +23,8 @@ module Utils string.force_encoding(cd.encoding) end string.encode("utf-8", :undef => :replace, :replace => "?", :invalid => :replace) + rescue + "Invalid code encoding" end end |