Skip to content

Should Any#contains? be Any::includes? #85

@HCLarsen

Description

@HCLarsen

There's a method in Any called contains?, and it's essentially a wrapper for the includes? method if the underlying value is an Array or String. Replacing it with a method called includes? would make this far more consistent with the core library.

It also returns a false value if the underlying object isn't an Array or String. Is this the best behaviour, or should it raise an exception in this situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions