Merged
Conversation
ChrisBr
commented
Jan 5, 2018
| dirs = new ArrayList<ByteList>(); | ||
| } else if (tmp.isNil()) { | ||
| dir = base.isEmpty() ? runtime.getCurrentDirectory() : base; | ||
| dirs = Dir.push_glob(runtime, dir, globArgumentAsByteList(context, args[0]), flags); |
Contributor
Author
There was a problem hiding this comment.
Wondering what the difference between runtime.getCurrentDirectory() and getCWD(runtime) or is it possible to simplify the code and only use either or?
Member
There was a problem hiding this comment.
@ChrisBr getCWD will force canonicalization whereas runtime.getCurrentDirectory is whatever it was set to (which might have already been canonicalized). Even if we happen to always canon. the stored value getCWD always tries to do it again (unless it is an URI).
Dir.glob is a dirty beast and I do not remember what contract it has for the incoming directory but that would be the proper guidance on which to use.
ChrisBr
added a commit
to ChrisBr/jruby
that referenced
this pull request
Jan 6, 2018
now it throws an ArgumentError like it does in MRI. Introduced in jruby#4936.
ChrisBr
added a commit
to ChrisBr/jruby
that referenced
this pull request
Jan 9, 2018
now it throws an ArgumentError like it does in MRI. Introduced in jruby#4936.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.ruby-lang.org/issues/13056
Tests c&p from ruby/ruby@52419a6.
#4876