True if the requested gem has already been installed.
Return the Specification that listed the dependency
Installing a git gem only involves building the extensions and generating the executables.
This is a null install as this specification is already installed. options
are ignored.
This is a null install as a locked specification is considered installed. options
are ignored.
Installs this specification using the Gem::Installer
options
. The install method yields a Gem::Installer
instance, which indicates the gem will be installed, or nil
, which indicates the gem is already installed.
After installation spec
is updated to point to the just-installed specification.
This is a null install as this gem was unpacked into a directory. options
are ignored.
Make sure the trust directory exists. If it does exist, make sure it’s actually a directory. If not, then create it with the appropriate permissions.
Invoked by IO#write
to write length
bytes to io
from from a specified buffer
(see IO::Buffer
).
The length
argument is the “(minimum) length to be written”. If the IO
buffer size is 8KiB, but the length
specified is 1024 (1KiB), at most 8KiB will be written, but at least 1KiB will be. Generally, the only case where less data than length
will be written is if there is an error writing the data.
Specifying a length
of 0 is valid and means try writing at least once, as much data as possible.
Suggested implementation should try to write to io
in a non-blocking manner and call io_wait
if the io
is not ready (which will yield control to other fibers).
See IO::Buffer
for an interface available to get data from buffer efficiently.
Expected to return number of bytes written, or, in case of an error, -errno
(negated number corresponding to system’s error code).
The method should be considered experimental.
Like Enumerable#zip
, but chains operation to be lazy-evaluated. However, if a block is given to zip, values are enumerated immediately.
Return the length of the hash value in bytes.
Return the length of the hash value (the digest) in bytes.
Digest::SHA256.new.digest_length * 8 # => 256 Digest::SHA384.new.digest_length * 8 # => 384 Digest::SHA512.new.digest_length * 8 # => 512
For example, digests produced by Digest::SHA256 will always be 32 bytes (256 bits) in size.
Returns the Fiddle::Pointer
of this handle.
Get the underlying pointer for ruby object val
and return it as a Fiddle::Pointer
object.
Generates a random prime number of bit length bits. If safe is set to true
, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem
.
Returns the output size of the digest, i.e. the length in bytes of the final message digest result.
digest = OpenSSL::Digest.new('SHA1') puts digest.digest_length # => 20
Sends the given command to this engine.
Raises an EngineError
if the command fails.