-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Enhanced RDoc for ::cp #74
Conversation
lib/fileutils.rb
Outdated
@@ -631,16 +631,52 @@ def link_entry(src, dest, dereference_root = false, remove_destination = false) | |||
end | |||
module_function :link_entry | |||
|
|||
# Copies files from +src+ to +dest+; | |||
# +src+ may not be the path to a directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This second part, describing what src and dest may not be seems weird. I would just drop the second part, and change the semicolon to a period. Near the end of method documentation, state that if +src+ is a directory, an exception is raised. You can completely remove the part about dest not being a path to a file, since that is allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
lib/fileutils.rb
Outdated
# | ||
# Copies a file content +src+ to +dest+. If +dest+ is a directory, | ||
# copies +src+ to +dest/src+. | ||
# If +src+ is the path to a file and +dest+ does not exist, copies +src+ to +dest+: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also true if dest is already a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
No description provided.