Skip to content

Instantly share code, notes, and snippets.

@machu
Created June 12, 2010 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machu/435884 to your computer and use it in GitHub Desktop.
Save machu/435884 to your computer and use it in GitHub Desktop.
diff --git a/misc/lib/compatible.rb b/misc/lib/compatible.rb
index 6f5b5cf..9968536 100644
--- a/misc/lib/compatible.rb
+++ b/misc/lib/compatible.rb
@@ -34,23 +34,6 @@ unless "".respond_to?('each')
end
end
-# Auto convert ASCII_8BIT pstore data (created by Ruby-1.8) to UTF-8.
-if "".respond_to?('force_encoding')
- require 'pstore'
- class PStore
- private
- def load(content)
- load_proc = proc {|obj|
- if obj.respond_to?('force_encoding') && obj.encoding == Encoding::ASCII_8BIT
- obj.force_encoding('UTF-8')
- end
- obj
- }
- Marshal::load(content, load_proc)
- end
- end
-end
-
# Ruby1.9では String が Enumerable ではなくなった
class String
def method_missing(name, *args, &block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment