Skip to content

Range#=== should not accept range argument #7137

@takaram

Description

@takaram

Environment Information

jruby 9.3.3.0 (2.6.8) 2022-01-19 b26de1f5c5 OpenJDK 64-Bit Server VM 11.0.13+8-Ubuntu-0ubuntu1.18.04 on 11.0.13+8-Ubuntu-0ubuntu1.18.04 +jit [linux-x86_64]

Expected Behavior

Unlike Range#cover?, Range#=== does not accept range arguments.

# MRI 2.6.9
p (1..10).cover?(2..3) #=> true
p (1..10) === (2..3) #=> false

Actual Behavior

(1..10) === (2..3) returns true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions