Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Gem::Resolver#amount_constrained

amount_constrained(dependency)

returns an integer \in (-\infty, 0] a number closer to 0 means the dependency is less constraining

dependencies w/ 0 or 1 possibilities (ignoring version requirements) are given very negative values, so they always sort first, before dependencies that are unconstrained

See also #allow_missing? #debug? .new #dependencies_for also in 4.0 · 3.4 · 3.3 · 3.1 · 3.0