diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-15 10:10:33 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-15 10:10:33 +0000 |
commit | ff6520b0f77e25dc269164c1be8853f808de06a0 (patch) | |
tree | 6ce62bd3cfc951de11c18ecbe46e23a8beac47f1 | |
parent | f50051ad5f915d01e959a84c5b9e368f39c9deb1 (diff) |
Added workaround to fileutils for `make btest` without rbconfig.
Followed up r63430.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/fileutils.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index fa96599b84..e6cff63591 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -548,7 +548,11 @@ module FileUtils 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 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: |