Skip to content
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

Merged
merged 2 commits into from
May 23, 2022
Merged

[DOC] Enhanced RDoc for ::cp #74

merged 2 commits into from
May 23, 2022

Conversation

BurdetteLamar
Copy link
Member

No description provided.

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
Copy link
Contributor

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.

Copy link
Member Author

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+:
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants