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] Dir doc #8014
[DOC] Dir doc #8014
Conversation
# Note that the pattern is not a regexp, it's closer to a shell glob. | ||
# See File::fnmatch for the meaning of the +flags+ parameter. | ||
# Case sensitivity depends on your system (+File::FNM_CASEFOLD+ is ignored). |
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.
We should talk about the possible flags
found in File::Constants
.
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.
I had not known where FNM_* were.
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.
I think we should list the flags under File::Constants
that can be used in this method.
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.
I agree, but out of scope for this PR?
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.
Ok I guess it's fair that this isn't causing a regression
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.
@peterzhu2118, I will not forget about your suggestion.
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.
@peterzhu2118, which flags in File::Constants apply for Dir.glob? I tried a couple of unlikelies (TRUNC, CREAT) and got no error.
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.
It looks like invalid flags just get silently ignored.
The link at line 304 is fouled by the expression in line 302. I don't know why, and I don't have a workaround.