Skip to content
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

Prefer block version of File.open to ensure file handle gets automatically closed #19412

Merged

Conversation

chessbyte
Copy link
Member

No description provided.

@chessbyte chessbyte force-pushed the prefer_block_version_of_File_open branch 2 times, most recently from fa1770d to f06808d Compare October 17, 2019 18:27
@djberg96
Copy link
Contributor

I'm not sure what ruby 2.4.x is complaining about. Maybe adding an ensure instead of using the block form will make it happy. It might be a little more readable in this case, too.

@jrafanie
Copy link
Member

@chessbyte can you rebase? #19414 was merged so we won't be testing ruby 2.4 anymore on master. 2.5 and 2.6.

@djberg96
Copy link
Contributor

@jrafanie Ah, I hadn't realized that was merged. You can probably disregard my comment then. :)

@jrafanie
Copy link
Member

@jrafanie Ah, I hadn't realized that was merged. You can probably disregard my comment then. :)

yeah, it was pretty uncontroversial since you can still bundle with 2.4. We only test in travis on 2.5 and 2.6 now.

@chessbyte chessbyte force-pushed the prefer_block_version_of_File_open branch from f06808d to 2082460 Compare October 21, 2019 20:47
@miq-bot
Copy link
Member

miq-bot commented Oct 21, 2019

Checked commit chessbyte@2082460 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@jrafanie jrafanie merged commit b9abd99 into ManageIQ:master Oct 22, 2019
@jrafanie jrafanie self-assigned this Oct 22, 2019
@jrafanie jrafanie added this to the Sprint 123 Ending Oct 28, 2019 milestone Oct 22, 2019
@jrafanie
Copy link
Member

I reverted this PR because we're giving devs 2 weeks to get off of ruby 2.4. See #19427

@chessbyte chessbyte deleted the prefer_block_version_of_File_open branch July 9, 2020 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants