Skip to content

Commit 41bf742

Browse files
committed
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
1 parent 0661821 commit 41bf742

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/fileutils.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
548548
module_function :move
549549

550550
def rename_cannot_overwrite_file? #:nodoc:
551-
/emx/ =~ RbConfig::CONFIG['host_os']
551+
if defined?(RbConfig)
552+
/emx/ =~ RbConfig::CONFIG['host_os']
553+
else
554+
/emx/ =~ RUBY_PLATFORM
555+
end
552556
end
553557
private_module_function :rename_cannot_overwrite_file?
554558

@@ -1153,7 +1157,11 @@ module StreamUtils_
11531157
private
11541158

11551159
def fu_windows?
1156-
/mswin|mingw|bccwin|emx/ =~ RbConfig::CONFIG['host_os']
1160+
if defined?(RbConfig)
1161+
/mswin|mingw|bccwin|emx/ =~ RbConfig::CONFIG['host_os']
1162+
else
1163+
/mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
1164+
end
11571165
end
11581166

11591167
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:

0 commit comments

Comments
 (0)