Fix conditional check on git adapter for String extension library.

This commit is contained in:
Bart Kamphorst
2018-09-17 16:53:07 +02:00
parent 676fb474b9
commit 812cd311c3
+2 -2
View File
@@ -25,15 +25,15 @@ Gollum::set_git_max_filesize(190 * 10**6)
# Use stringex #to_url only to leverage its #to_ascii method when using grit # Use stringex #to_url only to leverage its #to_ascii method when using grit
class String class String
if defined?(Gollum::GIT_ADAPTER) && Gollum::GIT_ADAPTER != 'grit' if Gollum::GIT_ADAPTER != 'grit'
def to_ascii def to_ascii
self # Do not transliterate utf-8 url's unless using Grit self # Do not transliterate utf-8 url's unless using Grit
end end
end
def to_url def to_url
to_ascii to_ascii
end end
end
end end
# Run the frontend, based on Sinatra # Run the frontend, based on Sinatra