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

ruby-changes:38161

From: usa <ko1@a...>
Date: Sun, 12 Apr 2015 09:06:31 +0900 (JST)
Subject: [ruby-changes:38161] usa:r50242 (trunk): * test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file

usa	2015-04-12 09:06:20 +0900 (Sun, 12 Apr 2015)

  New Revision: 50242

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

  Log:
    * test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file
      modes.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_file_exhaustive.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50241)
+++ ChangeLog	(revision 50242)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Apr 12 09:04:37 2015  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file
+	  modes.
+
 Sun Apr 12 08:56:44 2015  Tanaka Akira  <akr@f...>
 
 	* ext/-test-/file/fs.c: OpenBSD needs sys/param.h before sys/mount.h.
Index: test/ruby/test_file_exhaustive.rb
===================================================================
--- test/ruby/test_file_exhaustive.rb	(revision 50241)
+++ test/ruby/test_file_exhaustive.rb	(revision 50242)
@@ -59,26 +59,38 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L59
 
   def suidfile
     return @suidfile if defined? @suidfile
-    @suidfile = make_tmp_filename("suidfile")
-    make_file("", @suidfile)
-    File.chmod 04500, @suidfile
-    @suidfile
+    if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
+      @suidfile = make_tmp_filename("suidfile")
+      make_file("", @suidfile)
+      File.chmod 04500, @suidfile
+      @suidfile
+    else
+      @suidfile = nil
+    end
   end
 
   def sgidfile
     return @sgidfile if defined? @sgidfile
-    @sgidfile = make_tmp_filename("sgidfile")
-    make_file("", @sgidfile)
-    File.chmod 02500, @sgidfile
-    @sgidfile
+    if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
+      @sgidfile = make_tmp_filename("sgidfile")
+      make_file("", @sgidfile)
+      File.chmod 02500, @sgidfile
+      @sgidfile
+    else
+      @sgidfile = nil
+    end
   end
 
   def stickyfile
     return @stickyfile if defined? @stickyfile
-    @stickyfile = make_tmp_filename("stickyfile")
-    Dir.mkdir(@stickyfile)
-    File.chmod 01500, @stickyfile
-    @stickyfile
+    if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
+      @stickyfile = make_tmp_filename("stickyfile")
+      Dir.mkdir(@stickyfile)
+      File.chmod 01500, @stickyfile
+      @stickyfile
+    else
+      @stickyfile = nil
+    end
   end
 
   def symlinkfile

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

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