summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:31:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:31:12 +0000
commitce701babaea99b69e8a90f0dc929c7f60c1bacf2 (patch)
tree8238ae5aca3ea88c117993ba144be34fa125b291
parenta2ed2d20cb69da4c0c0258f04d704a370cf02d84 (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_3@54417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/rubygems/test_case.rb11
-rw-r--r--version.h2
3 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7397575172..8abc4f7c15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Mar 30 01:30:54 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]
+
Wed Mar 30 01:25:46 2016 NARUSE, Yui <naruse@ruby-lang.org>
* string.c (str_new_frozen): if the given string is embeddedable
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 3ffc608a1c..c31f29403e 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -252,6 +252,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 558945b3db..0fabedf259 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.0"
#define RUBY_RELEASE_DATE "2016-03-30"
-#define RUBY_PATCHLEVEL 65
+#define RUBY_PATCHLEVEL 66
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 3