Skip to content

Instantly share code, notes, and snippets.

@yoshimov
Created February 27, 2014 02:46
Show Gist options
  • Select an option

  • Save yoshimov/9243351 to your computer and use it in GitHub Desktop.

Select an option

Save yoshimov/9243351 to your computer and use it in GitHub Desktop.
*** ./lib/gollum-lib/committer.rb.org Thu Feb 27 00:23:14 2014
--- ./lib/gollum-lib/committer.rb Thu Feb 27 00:24:20 2014
***************
*** 118,124 ****
end
end
! fullpath = fullpath.force_encoding('ascii-8bit') if fullpath.respond_to?(:force_encoding)
begin
data = @wiki.normalize(data)
--- 118,124 ----
end
end
! fullpath = fullpath.force_encoding('utf-8') if fullpath.respond_to?(:force_encoding)
begin
data = @wiki.normalize(data)
***************
*** 151,157 ****
::File.join(dir, @wiki.page_file_name(name, format))
end
! path = path.force_encoding('ascii-8bit') if path.respond_to?(:force_encoding)
Dir.chdir(::File.join(@wiki.repo.path, '..')) do
if file_path_scheduled_for_deletion?(index.tree, path)
--- 151,157 ----
::File.join(dir, @wiki.page_file_name(name, format))
end
! path = path.force_encoding('utf-8') if path.respond_to?(:force_encoding)
Dir.chdir(::File.join(@wiki.repo.path, '..')) do
if file_path_scheduled_for_deletion?(index.tree, path)
***************
*** 236,242 ****
# Proxies methods t
def method_missing(name, *args)
! args.map! { |item| item.respond_to?(:force_encoding) ? item.force_encoding('ascii-8bit') : item }
index.send(name, *args)
end
end
--- 236,242 ----
# Proxies methods t
def method_missing(name, *args)
! args.map! { |item| item.respond_to?(:force_encoding) ? item.force_encoding('utf-8') : item }
index.send(name, *args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment