Blame SOURCES/rubygems-2.1.0-Use-File.join-instead-of-manual-path-creation.patch

79386f
From 6b8681421b516be1244e17618507811923b1bb3b Mon Sep 17 00:00:00 2001
79386f
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
79386f
Date: Thu, 14 Feb 2013 11:50:41 +0100
79386f
Subject: [PATCH] Use File.join instead of manual path creation.
79386f
79386f
This prevents issues, when File.join in #new_default_spec removes
79386f
superfluous slashes while they are kept in expected paths. E.g. the test
79386f
would fail if ruby configuration specifies --with-ruby-version=''.
79386f
---
79386f
 test/rubygems/test_gem_commands_contents_command.rb | 8 ++++----
79386f
 1 file changed, 4 insertions(+), 4 deletions(-)
79386f
79386f
diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb
79386f
index 60df53f..35c9631 100644
79386f
--- a/test/rubygems/test_gem_commands_contents_command.rb
79386f
+++ b/test/rubygems/test_gem_commands_contents_command.rb
79386f
@@ -140,10 +140,10 @@ def test_execute_default_gem
79386f
       @cmd.execute
79386f
     end
79386f
 
79386f
-    expected = %W[
79386f
-      #{Gem::ConfigMap[:bindir]}/default_command
79386f
-      #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb
79386f
-      #{Gem::ConfigMap[:archdir]}/default_gem.so
79386f
+    expected = [
79386f
+      File.join(Gem::ConfigMap[:bindir], 'default_command'),
79386f
+      File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'),
79386f
+      File.join(Gem::ConfigMap[:archdir], 'default_gem.so')
79386f
     ].sort.join "\n"
79386f
 
79386f
     assert_equal expected, @ui.output.chomp
79386f
-- 
79386f
1.8.5.5
79386f