Maintenance Ruby 3.3 gets fixes, but no new features. 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.3.0/lib/rubygems/text.rb, line 10
def clean_text(text)
text.gsub(/[\000-\b\v-\f\016-\037\177]/, ".")
end
Remove any non-printable characters and make the text suitable for printing.