End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Text#clean_text
clean_text(text)
lib/rubygems/text.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/text.rb, line 11
def clean_text(text)
text.gsub(/[\000-\b\v-\f\016-\037\177]/, ".".freeze)
end
Remove any non-printable characters and make the text suitable for printing.