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

ruby-changes:51227

From: hsbt <ko1@a...>
Date: Tue, 15 May 2018 19:10:40 +0900 (JST)
Subject: [ruby-changes:51227] hsbt:r63434 (trunk): Added workaround to fileutils for `make btest` without rbconfig.

hsbt	2018-05-15 19:10:33 +0900 (Tue, 15 May 2018)

  New Revision: 63434

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

  Log:
    Added workaround to fileutils for `make btest` without rbconfig.
    
      Followed up r63430.

  Modified files:
    trunk/lib/fileutils.rb
Index: lib/fileutils.rb
===================================================================
--- lib/fileutils.rb	(revision 63433)
+++ lib/fileutils.rb	(revision 63434)
@@ -548,7 +548,11 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L548
   module_function :move
 
   def rename_cannot_overwrite_file?   #:nodoc:
-    /emx/ =~ RbConfig::CONFIG['host_os']
+    if defined?(RbConfig)
+      /emx/ =~ RbConfig::CONFIG['host_os']
+    else
+      /emx/ =~ RUBY_PLATFORM
+    end
   end
   private_module_function :rename_cannot_overwrite_file?
 
@@ -1153,7 +1157,11 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1157
     private
 
     def fu_windows?
-      /mswin|mingw|bccwin|emx/ =~ RbConfig::CONFIG['host_os']
+      if defined?(RbConfig)
+        /mswin|mingw|bccwin|emx/ =~ RbConfig::CONFIG['host_os']
+      else
+        /mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
+      end
     end
 
     def fu_copy_stream0(src, dest, blksize = nil)   #:nodoc:

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

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