Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SpecificationPolicy#validate
validate(strict = false)
lib/rubygems/specification_policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification_policy.rb, line 46
def validate(strict = false)
validate_required!
validate_required_metadata!
validate_optional(strict) if packaging || strict
true
end
Does a sanity check on the specification.
Raises InvalidSpecificationException if the spec does not pass the checks.
It also performs some validations that do not raise but print warning messages instead.
See also
.new
#validate_array_attribute
#validate_array_attributes
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0