mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fileutils.rb: split fu_windows?
* lib/fileutils.rb (FileUtils::StreamUtils_#fu_windows?): select the method definition for each platforms, and dropped supports for deprecated platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f633d282a4
commit
36b183ce8c
1 changed files with 5 additions and 6 deletions
|
@ -1145,12 +1145,11 @@ module FileUtils
|
||||||
module StreamUtils_
|
module StreamUtils_
|
||||||
private
|
private
|
||||||
|
|
||||||
def fu_windows?
|
case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
|
||||||
if defined?(RbConfig)
|
when /mswin|mingw/
|
||||||
/mswin|mingw|bccwin|emx/ =~ RbConfig::CONFIG['host_os']
|
def fu_windows?; true end
|
||||||
else
|
else
|
||||||
/mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
|
def fu_windows?; false end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:
|
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue