Permalink
Browse files

fix bundle cache edge case for #1202

  • Loading branch information...
1 parent 3e71c5d commit a23240d1cfb2b250a60f8b17a4fbc517f6811872 @hone hone committed Mar 14, 2012
Showing with 12 additions and 1 deletion.
  1. +10 −0 lib/bundler/rubygems_integration.rb
  2. +2 −1 spec/realworld/edgecases_spec.rb
@@ -265,6 +265,15 @@ def backport_segment_generation
end
end
+ # This backport fixes the marshaling of @segments.
+ def backport_yaml_initialize
+ Gem::Version.send(:define_method, :yaml_initialize) do |tag, map|
+ @version = map['version']
+ @segments = nil
+ @hash = nil
+ end
+ end
+
# This backports base_dir which replaces installation path
# Rubygems 1.8+
def backport_base_dir
@@ -301,6 +310,7 @@ def initialize
backport_base_dir
backport_cache_file
backport_spec_file
+ backport_yaml_initialize
end
def stub_rubygems(specs)
@@ -14,7 +14,8 @@
it "bundle cache works with rubygems 1.3.7 and pre gems" do
install_gemfile <<-G
source :rubygems
- gem "rack", "1.3.0.beta2"
+ gem "rack", "1.3.0.beta2"
+ gem "will_paginate", "3.0.pre2"
G
bundle :cache
out.should_not include("Removing outdated .gem files from vendor/cache")

0 comments on commit a23240d

Please sign in to comment.