ruby1.8 compatibility

This commit is contained in:
hibariya
2011-11-12 11:32:54 +09:00
parent 620926c379
commit 5b84ecf372
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -401,7 +401,7 @@ module Gollum
end
highlighted = begin
encoding ||= Encoding::UTF_8
encoding ||= 'utf-8'
blocks.map { |lang, code| Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s}) }
rescue ::RubyPython::PythonError
[]
+1 -1
View File
@@ -432,7 +432,7 @@ context "Markup" do
index.commit("Add alpha.jpg")
page = @wiki.page("Bilbo Baggins")
rendered = Gollum::Markup.new(page).render(false, Encoding::UTF_8)
rendered = Gollum::Markup.new(page).render(false, 'utf-8')
assert_equal output, rendered
end