Fix Crystal::System::FileDescriptor to use @fd ivar directly#6703
Merged
RX14 merged 2 commits intocrystal-lang:masterfrom Sep 12, 2018
Merged
Conversation
jhass
approved these changes
Sep 12, 2018
jhass
reviewed
Sep 12, 2018
| # dup doesn't copy the CLOEXEC flag, so copy it manually using dup3 | ||
| flags = other.close_on_exec? ? LibC::O_CLOEXEC : 0 | ||
| if LibC.dup3(other.fd, self.fd, flags) == -1 | ||
| if LibC.dup3(other.@fd, self.@fd, flags) == -1 |
RX14
approved these changes
Sep 12, 2018
asterite
approved these changes
Sep 12, 2018
ezrast
pushed a commit
to ezrast/crystal
that referenced
this pull request
Oct 2, 2018
…-lang#6703) * Fix Crystal::System::FileDescriptor to use @fd ivar directly * fixup! Fix Crystal::System::FileDescriptor to use @fd ivar directly
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.
A method
fdis actually not exposed inCrystal::System::FileDescriptoritself, so accessing the ivar directly is better and consistent with the rest of the module (everywhere else in this file it's@fd).