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

ruby-changes:42618

From: usa <ko1@a...>
Date: Fri, 22 Apr 2016 17:18:25 +0900 (JST)
Subject: [ruby-changes:42618] usa:r54692 (ruby_2_2): merge revision(s) 54307: [Backport #12193]

usa	2016-04-22 18:15:03 +0900 (Fri, 22 Apr 2016)

  New Revision: 54692

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

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/lib/rubygems/test_case.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 54691)
+++ ruby_2_2/version.h	(revision 54692)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.5"
 #define RUBY_RELEASE_DATE "2016-04-22"
-#define RUBY_PATCHLEVEL 306
+#define RUBY_PATCHLEVEL 307
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 4
Index: ruby_2_2/lib/rubygems/test_case.rb
===================================================================
--- ruby_2_2/lib/rubygems/test_case.rb	(revision 54691)
+++ ruby_2_2/lib/rubygems/test_case.rb	(revision 54692)
@@ -250,6 +250,17 @@ class Gem::TestCase < MiniTest::Unit::Te https://github.com/ruby/ruby/blob/trunk/ruby_2_2/lib/rubygems/test_case.rb#L250
       @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_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 54691)
+++ ruby_2_2/ChangeLog	(revision 54692)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Fri Apr 22 18:13:22 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 22 16:37:14 2016  multisnow  <infinity.blick.winkel@g...>
 
 	* ext/openssl/extconf.rb: check RAND_edg to support libressl.

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


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

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