rubygems/rubygems — pull request #371 by headius (2012-09-12 22:07:30+00:00)
Title: URL path logic in path_support

I will admit this change is a bit cumbersome, but I'm looking for help coming up with something better.

This code exists in JRuby's copy of RubyGems to allow loading specs, etc from URL locations like file:, jar:, and classpath:. This feature is used extensively by JRuby to allow gems to load from within package applications that may not be expanded on the filesystem (in other words, this allows us to run gem contents from within a JRuby application archive of some sort).

The code here fixes up previously-split paths back into URLs and then continues. It's not the prettiest thing, but it was written this way to avoid functionally changing any of the path-splitting logic that already existed and only doing this when there's a file: or jar:file: or classpath: URL that gets broken into pieces.

Suggestions? Thoughts?