From 2edc14be692d57f16b9ff4aca57586ff17741603 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 6 Dec 2023 10:37:14 +0900 Subject: [PATCH] [ruby/fileutils] [DOC] nodoc for private methods and module https://github.com/ruby/fileutils/commit/75c6010aab --- lib/fileutils.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/fileutils.rb b/lib/fileutils.rb index f8c3740f502cb8..1a95ef392af969 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -2028,21 +2028,22 @@ def touch(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil) private - module StreamUtils_ + module StreamUtils_ # :nodoc: + private case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM) when /mswin|mingw/ - def fu_windows?; true end + def fu_windows?; true end #:nodoc: else - def fu_windows?; false end + def fu_windows?; false end #:nodoc: end def fu_copy_stream0(src, dest, blksize = nil) #:nodoc: IO.copy_stream(src, dest) end - def fu_stream_blksize(*streams) + def fu_stream_blksize(*streams) #:nodoc: streams.each do |s| next unless s.respond_to?(:stat) size = fu_blksize(s.stat) @@ -2051,14 +2052,14 @@ def fu_stream_blksize(*streams) fu_default_blksize() end - def fu_blksize(st) + def fu_blksize(st) #:nodoc: s = st.blksize return nil unless s return nil if s == 0 s end - def fu_default_blksize + def fu_default_blksize #:nodoc: 1024 end end @@ -2503,7 +2504,7 @@ def fu_output_message(msg) #:nodoc: end private_module_function :fu_output_message - def fu_split_path(path) + def fu_split_path(path) #:nodoc: path = File.path(path) list = [] until (parent, base = File.split(path); parent == path or parent == ".") @@ -2524,7 +2525,7 @@ def fu_relative_components_from(target, base) #:nodoc: end private_module_function :fu_relative_components_from - def fu_clean_components(*comp) + def fu_clean_components(*comp) #:nodoc: comp.shift while comp.first == "." return comp if comp.empty? clean = [comp.shift] @@ -2543,11 +2544,11 @@ def fu_clean_components(*comp) private_module_function :fu_clean_components if fu_windows? - def fu_starting_path?(path) + def fu_starting_path?(path) #:nodoc: path&.start_with?(%r(\w:|/)) end else - def fu_starting_path?(path) + def fu_starting_path?(path) #:nodoc: path&.start_with?("/") end end