pessimistic constraint operator

The ~> version operator, which allows only the rightmost number you wrote to increase.

In more detail

So "~> 3.6" accepts 3.6, 3.7 and later 3.x releases but never 4.0, and "~> 3.6.0" accepts only 3.6.x patch releases. It is the sensible default for providers because it lets in fixes and features without a breaking major release.

Example

version = "~> 3.6"    # 3.6 up to, not including, 4.0

Related terms

Taught in

References