End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::SpecificationPolicy#validate_array_attribute
validate_array_attribute(field)
lib/rubygems/specification_policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/specification_policy.rb, line 332
def validate_array_attribute(field)
val = @specification.send(field)
klass = case field
when :dependencies then
Gem::Dependency
else
String
end
unless Array === val && val.all? {|x| x.kind_of?(klass) }
error "#{field} must be an Array of #{klass}"
end
end
No documentation available
See also
#validate
#validate_array_attributes
.new
#validate_attribute_present
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0