Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Fix for spec failure introduced in d24e788, with gemspec cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
dekellum committed Apr 9, 2012
1 parent 26637b7 commit 0310e95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/bundler.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 0310e95

Please sign in to comment.