Returns the leading (‘type’) part of the media type from the value of field 'Content-Type'
, or nil
if no such field exists; see Content-Type response header:
res = Net::HTTP.get_response(hostname, '/todos/1') res['content-type'] # => "application/json; charset=utf-8" res.main_type # => "application"
Return a Hash
for RJIT statistics. --rjit-stats makes more information available.
Creates an unsigned certificate for subject
and key
. The lifetime of the key is from the current time to age
which defaults to one year.
The extensions
restrict the key to the indicated uses.
Creates a new digest instance using the specified algorithm
. The default is SHA256.
Creates a new key pair of the specified algorithm
. RSA, DSA, and EC are supported.
Enumerates the trusted certificates via Gem::Security::TrustDir
.
Simple deprecation method that deprecates name
by wrapping it up in a dummy method. It warns on each call to the dummy method telling the user of repl
(unless repl
is :none) and the Rubygems version that it is planned to go away.
Simple deprecation method that deprecates name
by wrapping it up in a dummy method. It warns on each call to the dummy method telling the user of repl
(unless repl
is :none) and the Rubygems version that it is planned to go away.
Message to promote available RubyGems update with related gem update command.
Terminates the RubyGems process with the given exit_code
Change the current process’s real and effective user ID to that specified by user. Returns the new user ID. Not available on all platforms.
[Process.uid, Process.euid] #=> [0, 0] Process::UID.change_privilege(31) #=> 31 [Process.uid, Process.euid] #=> [31, 31]
Exchange real and effective user IDs and return the new effective user ID. Not available on all platforms.
[Process.uid, Process.euid] #=> [0, 31] Process::UID.re_exchange #=> 0 [Process.uid, Process.euid] #=> [31, 0]
Returns true
if the real and effective user IDs of a process may be exchanged on the current platform.
Change the current process’s real and effective group ID to that specified by group. Returns the new group ID. Not available on all platforms.
[Process.gid, Process.egid] #=> [0, 0] Process::GID.change_privilege(33) #=> 33 [Process.gid, Process.egid] #=> [33, 33]
Exchange real and effective group IDs and return the new effective group ID. Not available on all platforms.
[Process.gid, Process.egid] #=> [0, 33] Process::GID.re_exchange #=> 0 [Process.gid, Process.egid] #=> [33, 0]
Returns true
if the real and effective group IDs of a process may be exchanged on the current platform.
Check if --yjit-stats
is used.
Discard statistics collected for --yjit-stats
.