class Bundler::RubygemsIntegration

def backport_segment_generation

by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7.
This backports the correct segment generation code from Rubygems 1.4+
def backport_segment_generation
  redefine_method(Gem::Version, :segments) do
    @segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s|
      /^\d+$/ =~ s ? s.to_i : s
    end
  end
end