Fix for 1.8 versions of ruby

This commit is contained in:
Arran Cudbard-Bell
2012-06-19 15:33:47 +02:00
parent c704d1f3b3
commit 67dd3afd92
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ module Precious
page_versions = @page.versions
first = page_versions ? page_versions.first : false
return DEFAULT_AUTHOR unless first
first.author.name.force_encoding('UTF-8')
first.author.name.respond_to?(:force_encoding) ? first.author.name.force_encoding('UTF-8') : first.author.name
end
def date