summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/commands/contents_command.rb4
-rw-r--r--lib/rubygems/defaults.rb7
-rw-r--r--lib/rubygems/path_support.rb2
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/rubygems/commands/contents_command.rb b/lib/rubygems/commands/contents_command.rb
index 404c6745bd..42c7fabd86 100644
--- a/lib/rubygems/commands/contents_command.rb
+++ b/lib/rubygems/commands/contents_command.rb
@@ -75,14 +75,14 @@ class Gem::Commands::ContentsCommand < Gem::Command
if Gem.configuration.verbose then
say "\nDirectories searched:"
- spec_dirs.each { |dir| say dir }
+ spec_dirs.sort.each { |dir| say dir }
end
terminate_interaction 1 if gem_names.length == 1
end
if spec.default_gem?
- files = spec.files.map do |file|
+ files = spec.files.sort.map do |file|
case file
when /\A#{spec.bindir}\//
[Gem::ConfigMap[:bindir], $POSTMATCH]
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index e32131b9d4..ea84e5c018 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -58,6 +58,13 @@ module Gem
end
##
+ # How String Gem paths should be split. Overridable for esoteric platforms.
+
+ def self.path_separator
+ File::PATH_SEPARATOR
+ end
+
+ ##
# Default gem load path
def self.default_path
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
index 059e372112..7195b322ef 100644
--- a/lib/rubygems/path_support.rb
+++ b/lib/rubygems/path_support.rb
@@ -54,7 +54,7 @@ class Gem::PathSupport
if gpaths.kind_of?(Array)
gem_path = gpaths.dup
else
- gem_path = gpaths.split(File::PATH_SEPARATOR)
+ gem_path = gpaths.split(Gem.path_separator)
end
if File::ALT_SEPARATOR then