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

Ensure Gem.win_platform? is available #858

Merged
merged 1 commit into from
Jan 16, 2022
Merged

Ensure Gem.win_platform? is available #858

merged 1 commit into from
Jan 16, 2022

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jan 16, 2022

Summary

Ensure Gem.win_platform? is available by explicitly requiring rubygems.

Motivation and Context

Even though rubygems is nearly always loaded by ruby automatically, it is possible to avoid doing so. Therefore, to make platform detection work, we have to require "rubygems" explicitly.

Fixes #852.

How Has This Been Tested?

Specs were added that exercise the relevant functionality for the case where rubygems is not loaded.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I've added tests for my code

Even though rubygems is nearly always loaded by ruby automatically, it
is possible to avoid doing so. Therefore, to make platform detection
work, we have to require "rubygems" explicitly.
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the test!

@mvz mvz merged commit 629a8c2 into main Jan 16, 2022
@mvz mvz deleted the require-rubygems branch January 16, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Gem.win_platform? may lead to issues
2 participants