Returns true when the user has enabled multifactor authentication from response
text.
Displays an error statement
to the error output location. Asks a question
if given.
Displays a warning statement
to the warning output location. Asks a question
if given.
Terminates the RubyGems process with the given exit_code
SecureRandom.random_bytes generates a random binary string.
The argument n specifies the length of the result string.
If n is not specified or is nil, 16 is assumed. It may be larger in future.
The result may contain any byte: “x00” - “xff”.
require 'securerandom' SecureRandom.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6" SecureRandom.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97"
If a secure random number generator is not available, NotImplementedError
is raised.
Generates formatted random number from raw random bytes. See Random#rand
.
Returns the description corresponding to the HTTP status code
WEBrick::HTTPStatus.reason_phrase 404 => "Not Found"
Is code
a client error status?
Is code
a server error status?
Returns the description corresponding to the HTTP status code
WEBrick::HTTPStatus.reason_phrase 404 => "Not Found"
Is code
a client error status?
Is code
a server error status?
Parses an HTTP header raw
into a hash of header fields with an Array
of values.
Parses an HTTP header raw
into a hash of header fields with an Array
of values.
Parses q values in value
as used in Accept headers.
Parses q values in value
as used in Accept headers.
Parses the query component of a URI
in str
Parses the query component of a URI
in str
Unescapes form reserved characters in str
Creates TCP server sockets bound to address
:port
and returns them.
It will create IPV4 and IPV6 sockets on all interfaces.
Creates TCP server sockets bound to address
:port
and returns them.
It will create IPV4 and IPV6 sockets on all interfaces.