Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.
sanitize_string(string)public
Sanitize a single string.
# File lib/rubygems/indexer.rb, line 400
def sanitize_string(string)
return string unless string
# HACK the #to_s is in here because RSpec has an Array of Arrays of
# Strings for authors. Need a way to disallow bad values on gemspec
# generation. (Probably won't happen.)
string = string.to_s
begin
Builder::XChar.encode string
rescue NameError, NoMethodError
string.to_xs
end
end Related methods
- Instance methods
- abbreviate
- build_indicies
- build_marshal_gemspecs
- build_modern_index
- build_modern_indicies
- compact_specs
- compress
- compress_indicies
- gem_file_list
- generate_index
- gzip
- install_indicies
- make_temp_directories
- map_gems_to_specs
- paranoid
- sanitize
- sanitize_string
- update_index
- update_specs_index
- Class methods
- new