Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for spec failure introduced in d24e788, with gemspec cache.

  • Loading branch information...
commit 0310e95a1aa6ddf89b4c847a1dac4bc4ae56ec11 1 parent 26637b7
@dekellum dekellum authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/bundler.rb
View
6 lib/bundler.rb
@@ -271,7 +271,11 @@ def read_file(file)
def load_gemspec(file)
@gemspec_cache ||= {}
- @gemspec_cache[File.expand_path(file)] ||= load_gemspec_uncached(file)
+ key = File.expand_path(file)
+ spec = ( @gemspec_cache[key] ||= load_gemspec_uncached(file) )
+ # Protect against caching side-effected gemspecs by returning a
+ # new instance each time.
+ spec.dup if spec
end
def load_gemspec_uncached(file)
Please sign in to comment.
Something went wrong with that request. Please try again.