-
-
Notifications
You must be signed in to change notification settings - Fork 396
File.dirname: add a spec for Shift JIS handling #1330
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
+29
−0
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
Just had this test fail in CI on macOS with Ruby 3.2.9:
What even is this encoding? It's not listed on my system and clearly wasn't a problem when this PR was made 🤔
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.
Actually, this makes no sense, that branch does not include this test at all!
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 to handle that too with
File.dirname: https://github.com/ruby/ruby/pull/15919/changes#diff-f9288a658b2b8283fa9576185f8e17b99ade402e97f2ca60b368188234f917f1R167I suspect we should do the same here, but maybe @eregon has a different opinion?
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've pushed #1334 as a simple workaround by not running these specs on Ruby 3.2. The error is not related to the spec, and Ruby 3.2 is nearing EOL.
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 now on master.
From #1334 (comment)
Maybe we should drop 3.2 now?
I'm happy I managed to convince CRuby to drop replicate encodings, these replicates clearly caused extra edge cases like this one for little value.
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'll drop Ruby 3.2 on the next sync from ruby/spec. It's also annoying to have 4 versions supported due to slower CI.
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 still don't understand how this test failed on a branch that doesn't have the test (here). This implies that wrong code is running, somehow.
Uh oh!
There was an error while loading. Please reload this page.
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.
That's just because CI runs on a merge commit between your branch and master:
This run ran on 1c21abb
And this issue is transient because of spec ordering and we're running specs in parallel in CI so the ordering is not always the same.
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.
Huh, didn't realise it could do that. Thank you for the explanation!