Created
September 24, 2013 01:45
-
-
Save nddrylliog/6679351 to your computer and use it in GitHub Desktop.
marshall.diff is my workaround (you probably want a better solution), rubygems.diff is how you disable the local cache completely. :)
This file contains 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/kernel/common/marshal.rb b/kernel/common/marshal.rb | |
index 688c24c..f9f9823 100644 | |
--- a/kernel/common/marshal.rb | |
+++ b/kernel/common/marshal.rb | |
@@ -546,7 +546,7 @@ module Marshal | |
call obj if @proc and call_proc | |
- @stream.tainted? ? obj.taint : obj | |
+ (@stream.tainted? && !obj.frozen?) ? obj.taint : obj | |
end | |
def construct_class |
This file contains 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/lib/rubygems/source.rb b/lib/rubygems/source.rb | |
index f0e2a59..c0bdd3e 100644 | |
--- a/lib/rubygems/source.rb | |
+++ b/lib/rubygems/source.rb | |
@@ -83,26 +83,26 @@ class Gem::Source | |
cache_dir = cache_dir uri | |
- local_spec = File.join cache_dir, spec_file_name | |
+ #local_spec = File.join cache_dir, spec_file_name | |
- if File.exist? local_spec then | |
- spec = Gem.read_binary local_spec | |
- spec = Marshal.load(spec) rescue nil | |
- return spec if spec | |
- end | |
+ #if File.exist? local_spec then | |
+ # spec = Gem.read_binary local_spec | |
+ # spec = Marshal.load(spec) rescue nil | |
+ # return spec if spec | |
+ #end | |
uri.path << '.rz' | |
spec = fetcher.fetch_path uri | |
spec = Gem.inflate spec | |
- if update_cache? then | |
- FileUtils.mkdir_p cache_dir | |
+ #if update_cache? then | |
+ # FileUtils.mkdir_p cache_dir | |
- open local_spec, 'wb' do |io| | |
- io.write spec | |
- end | |
- end | |
+ # open local_spec, 'wb' do |io| | |
+ # io.write spec | |
+ # end | |
+ #end | |
# TODO: Investigate setting Gem::Specification#loaded_from to a URI | |
Marshal.load spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment