diff options
author | Terence Lee <hone02@gmail.com> | 2011-09-12 02:28:17 -0400 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2011-09-12 02:35:20 -0400 |
commit | 4a0697cc463dfaef9eeb5c5be8628d14558d2850 (patch) | |
tree | 221518688315570a28dd74626fe9ebdba2ab871a | |
parent | d8ec8ef3bc80a4d652091398aeba58ccc4325054 (diff) | |
download | bundler-4a0697cc463dfaef9eeb5c5be8628d14558d2850.tar.gz |
Revert "fix bundle cache again for rubygems 1.3.x"
This reverts commit bad23b5bdbb74858c1eb2406f08901c9feb35807.
Conflicts:
lib/bundler/rubygems_ext.rb
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 12082b1851..d6721c876a 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -254,9 +254,14 @@ module Bundler # by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7. def backport_segment_generation Gem::Version.send(:define_method, :segments) do - @segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s| - /^\d+$/ =~ s ? s.to_i : s + @segments_generated ||= false + unless @segments_generated + @segments ||= @version.scan(/[0-9a-z]+/i).map do |s| + /^\d+$/ =~ s ? s.to_i : s + end end + @segments_generated = true + @segments end end |