Skip to content

Conversation

@jeremyevans
Copy link
Contributor

Previously, it would be an infinite loop if passed a non-prime
integer.

Also, Prime.include? should also provide similar results to
Module#include? if passed a Module, so handle that.

Previously, it would be an infinite loop if passed a non-prime
integer.

Also, Prime.include? should also provide similar results to
Module#include? if passed a Module, so handle that.

For consistency with Enumerable#include?, return false if passed
other object types.

Fixes Ruby Bug 10167.
Copy link
Member

@marcandre marcandre left a comment

Choose a reason for hiding this comment

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

👍

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.

2 participants