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

Commit

Permalink
Fix rake issue with rubygems 1.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Aug 8, 2011
1 parent f08f9a9 commit cdb6483
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cdb6483

Please sign in to comment.