Created
June 12, 2010 16:45
-
-
Save machu/435884 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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