summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 08:49:52 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 08:49:52 +0000
commit54c011a92fcc93dbf3bd5f4cb587196510fb3d1f (patch)
tree7691b263b375758406ddc05ebf8fc0737b9f8abd
parent674725f1e83627b04da8a0a83da83a4454e3796e (diff)
merge revision(s) 54307: [Backport #12193]
* lib/rubygems/test_case.rb: Fix test on Windows for inconsistent temp path. https://github.com/rubygems/rubygems/pull/1554 [Bug #12193][ruby-core:74431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@54689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/rubygems/test_case.rb11
-rw-r--r--version.h6
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c0dee4842..128efa0a9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 22 17:49:34 2016 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * lib/rubygems/test_case.rb: Fix test on Windows for inconsistent temp path.
+ https://github.com/rubygems/rubygems/pull/1554
+ [Bug #12193][ruby-core:74431]
+
Fri Apr 1 00:41:17 2016 NAKAMURA Usaku <usa@ruby-lang.org>
* test/rubygems/test_gem_commands_environment_command.rb (test_execute):
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 328731d4ea..574a1149d0 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -247,6 +247,17 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@tempdir.untaint
end
+ # This makes the tempdir consistent on Windows.
+ # Dir.tmpdir may return short path name, but Dir[Dir.tmpdir] returns long
+ # path name. https://bugs.ruby-lang.org/issues/10819
+ # File.expand_path or File.realpath doesn't convert path name to long path
+ # name. Only Dir[] (= Dir.glob) works.
+ # Short and long path name is specific to Windows filesystem.
+ if win_platform?
+ @tempdir = Dir[@tempdir][0]
+ @tempdir.untaint
+ end
+
@gemhome = File.join @tempdir, 'gemhome'
@userhome = File.join @tempdir, 'userhome'
ENV["GEM_SPEC_CACHE"] = File.join @tempdir, 'spec_cache'
diff --git a/version.h b/version.h
index 60376cd2d5..8c2dfbb5db 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.1.10"
-#define RUBY_RELEASE_DATE "2016-04-01"
-#define RUBY_PATCHLEVEL 492
+#define RUBY_RELEASE_DATE "2016-04-22"
+#define RUBY_PATCHLEVEL 493
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 1
+#define RUBY_RELEASE_DAY 22
#include "ruby/version.h"