Improve gitlab encode method

This commit is contained in:
randx 2012-06-17 22:00:13 +03:00
parent 5ff658a607
commit f909e25d1b

View file

@ -27,7 +27,8 @@ module Gitlab
# Prevent app from crash cause of encoding errors
rescue
"--broken encoding: #{detect[:encoding]}"
encoding = detect ? detect[:encoding] : "unknown"
"--broken encoding: #{encoding}"
end
def detect_encoding message