Permalink
Browse files

Fix rake issue with rubygems 1.3.x

  • Loading branch information...
1 parent f08f9a9 commit cdb64838ae6ce2ea2dfe59a6579703e17eafdfca @hone hone committed Aug 8, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/bundler/rubygems_ext.rb
@@ -162,9 +162,10 @@ def hash
if Gem::Version.new(Gem::VERSION) < Gem::Version.new("1.4.0")
class Version
def segments # :nodoc:
+ @segments_generated ||= false
unless @segments_generated
- @segments = @version.scan(/[0-9]+|[a-z]+/i).map do |s|
- /^\\\\d+$/ =~ s ? s.to_i : s
+ @segments ||= @version.scan(/[0-9a-z]+/i).map do |s|
+ /^\d+$/ =~ s ? s.to_i : s
end
end
@segments_generated = true

0 comments on commit cdb6483

Please sign in to comment.