Skip to content

[Enumerable] Update include? to accept untyped#2715

Closed
sampersand wants to merge 1 commit intoruby:masterfrom
sampersand:sampersand/2025-11-23/update-enumerable-include
Closed

[Enumerable] Update include? to accept untyped#2715
sampersand wants to merge 1 commit intoruby:masterfrom
sampersand:sampersand/2025-11-23/update-enumerable-include

Conversation

@sampersand
Copy link
Copy Markdown
Contributor

@sampersand sampersand commented Nov 24, 2025

This PR updates Enumerable#include? (and member?) to accept untyped instead of Elem

@ParadoxV5
Copy link
Copy Markdown
Contributor

Duplicate of #2273

Could #1875 help with the uncertainty?

def include?: (Elem sample) -> bool
            & (untyped object) -> false

@soutaro
Copy link
Copy Markdown
Member

soutaro commented Mar 16, 2026

Merged in #2878

@soutaro soutaro closed this Mar 16, 2026
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.

3 participants