summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2023-12-06 10:37:14 +0900
committergit <[email protected]>2024-02-21 16:57:30 +0000
commit2edc14be692d57f16b9ff4aca57586ff17741603 ()
tree748deb3403ad7563d5cf44f31b92023de320ed80
parent6e704311bbb7c499f191d9b7d29dac0e37feabde (diff)
[ruby/fileutils] [DOC] nodoc for private methods and module
https://.com/ruby/fileutils/commit/75c6010aab
-rw-r--r--lib/fileutils.rb21
1 files changed, 11 insertions, 10 deletions
@@ -2028,21 +2028,22 @@ module FileUtils
private
- module StreamUtils_
private
case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
when /mswin|mingw/
- def fu_windows?; true end
else
- def fu_windows?; false end
end
def fu_copy_stream0(src, dest, blksize = nil) #:nodoc:
IO.copy_stream(src, dest)
end
- def fu_stream_blksize(*streams)
streams.each do |s|
next unless s.respond_to?(:stat)
size = fu_blksize(s.stat)
@@ -2051,14 +2052,14 @@ module FileUtils
fu_default_blksize()
end
- def fu_blksize(st)
s = st.blksize
return nil unless s
return nil if s == 0
s
end
- def fu_default_blksize
1024
end
end
@@ -2503,7 +2504,7 @@ module FileUtils
end
private_module_function :fu_output_message
- def fu_split_path(path)
path = File.path(path)
list = []
until (parent, base = File.split(path); parent == path or parent == ".")
@@ -2524,7 +2525,7 @@ module FileUtils
end
private_module_function :fu_relative_components_from
- def fu_clean_components(*comp)
comp.shift while comp.first == "."
return comp if comp.empty?
clean = [comp.shift]
@@ -2543,11 +2544,11 @@ module FileUtils
private_module_function :fu_clean_components
if fu_windows?
- def fu_starting_path?(path)
path&.start_with?(%r(\w:|/))
end
else
- def fu_starting_path?(path)
path&.start_with?("/")
end
end