[前][次][番号順一覧][スレッド一覧]

ruby-changes:42615

From: usa <ko1@a...>
Date: Fri, 22 Apr 2016 16:53:21 +0900 (JST)
Subject: [ruby-changes:42615] usa:r54689 (ruby_2_1): merge revision(s) 54307: [Backport #12193]

usa	2016-04-22 17:49:52 +0900 (Fri, 22 Apr 2016)

  New Revision: 54689

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54689

  Log:
    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]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/lib/rubygems/test_case.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 54688)
+++ ruby_2_1/version.h	(revision 54689)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #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"
 
Index: ruby_2_1/lib/rubygems/test_case.rb
===================================================================
--- ruby_2_1/lib/rubygems/test_case.rb	(revision 54688)
+++ ruby_2_1/lib/rubygems/test_case.rb	(revision 54689)
@@ -247,6 +247,17 @@ class Gem::TestCase < MiniTest::Unit::Te https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/rubygems/test_case.rb#L247
       @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'
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 54688)
+++ ruby_2_1/ChangeLog	(revision 54689)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Fri Apr 22 17:49:34 2016  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* 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@r...>
 
 	* test/rubygems/test_gem_commands_environment_command.rb (test_execute):

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r54307


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]