End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Security.email_to_name
email_to_name(email_address)
lib/rubygems/security.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/security.rb, line 506
def self.email_to_name(email_address)
cn, dcs = email_address.split '@'
dcs = dcs.split '.'
name = "CN=#{cn}/#{dcs.map {|dc| "DC=#{dc}" }.join '/'}"
OpenSSL::X509::Name.parse name
end
Turns email_address into an OpenSSL::X509::Name
See also
.create_key
.get_public_key
.create_digest
.reset
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1