Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#sanitize
sanitize
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 1489
def sanitize
self.summary = sanitize_string(summary)
self.description = sanitize_string(description)
self.post_install_message = sanitize_string(post_install_message)
self.authors = authors.collect {|a| sanitize_string(a) }
end
Sanitize the descriptive fields in the spec. Sometimes non-ASCII characters will garble the site index. Non-ASCII characters will be replaced by their XML entity equivalent.
See also
#same_attributes?
#sanitize_string
#runtime_dependencies
#satisfies_requirement?
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0