On this page
Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
Gem::Cooldown
Applies a cooldown period to remote gem versions as a supply chain attack mitigation. When a cooldown of N days is configured, gem versions published within the last N days are not considered for installation or update. Versions whose publish time is unknown are never excluded, so sources that do not provide publish times keep working.
The cooldown period comes from the --cooldown DAYS option when given, and 0 there disables the cooldown. Without the option the :cooldown: setting in the gemrc file and Bundler’s own cooldown setting both apply and the longer of the two wins, so a 0 in either of them disables nothing while the other names a period.
Class methods 5
Instance methods 3
Matches the four-digit year an ISO 8601 timestamp starts with. Time.iso8601 also accepts a year of any length, and one far enough away overflows the Float arithmetic behind remaining_days.
Matches an ISO 8601 time zone designator at the end of a timestamp.
The cooldown period in days.