Skip to content

Ruby: model Pathname#existence extension from ActiveSupport #10784

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

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

alexrford
Copy link
Contributor

@alexrford alexrford added no-change-note-required This PR does not need a change note Ruby Ruby GA labels Oct 11, 2022
override predicate row(string row) {
// package1;type1;package2;type2;path
// Pathname#existence : Pathname
row = ";Pathname;;Pathname;Method[existence].ReturnValue"
Copy link
Contributor

@hmac hmac Oct 12, 2022

Choose a reason for hiding this comment

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

You could use activesupport as the package name here - I don't think it does any harm and we do that for some of the other rails libraries already.

Scrap that - Pathname is a stdlib class so you're right not to have a package name here.

Copy link
Contributor

Choose a reason for hiding this comment

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

(sorry if this isn't ready for review btw - I didn't notice it was still a draft until now)

Copy link
Contributor Author

@alexrford alexrford Oct 12, 2022

Choose a reason for hiding this comment

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

Thanks, I wasn't quite sure what our policy was here. I've specified activesupport as the package name in all the cases here involving existence and added an "activesupport;Pathname;;Pathname;" type definition to maintain the existing Pathname related flow when using the existence method.

I missed the updated comment here - reverted.

@alexrford alexrford force-pushed the ruby/pathname-existence branch from 12a27cc to bf4dac7 Compare October 12, 2022 13:54
@alexrford alexrford marked this pull request as ready for review October 12, 2022 13:55
@alexrford alexrford requested a review from a team as a code owner October 12, 2022 13:55
@alexrford alexrford merged commit a65850e into github:main Oct 13, 2022
@alexrford alexrford deleted the ruby/pathname-existence branch October 13, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Ruby GA Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants