Skip to content

Inconsistency in ~> x.y.z requirement with pre-release #570

@Blacksmoke16

Description

@Blacksmoke16

TBD if this is just a documentation issue, or a legitimate bug. But the docs call out ~> 2.0.3 is identical to >= 2.0.3 and < 2.1;. Assuming the ; is a typo and doesn't have some special meaning, it is expected that the following test cases pass when comparing against a version with a pre-release:

matches?("2.1.0-dev", "<2.1").should be_true
matches?("2.1.0-dev", ">=2.0.3").should be_true
matches?("2.1.0-dev", ">=2.0.3, <2.1").should be_true

However, matches?("2.1.0-dev", "~> 2.0.3").should be_true does not.

So either the docs are wrong given its not identical, or this just is an actual bug that needs handled in the code.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions