Reset the dir
and path
values. The next time dir
or path
is requested, the values will be calculated from scratch. This is mainly used by the unit tests to provide test isolation.
Returns a list of paths matching glob
that can be used by a gem to pick up features from other gems. For example:
Gem.find_files('rdoc/discover').each do |path| load path end
if check_load_path
is true (the default), then find_files
also searches $LOAD_PATH for files as well as gems.
Note that find_files
will return all files even if they are from different versions of the same gem. See also find_latest_files
An Array
of the default sources that come with RubyGems
Default home directory path to be used if an alternate value is not specified in the environment
Default gem load path
The default directory for binaries
Default options for gem commands for Ruby implementers.
The options here should be structured as an array of string “gem” command names as keys and a string of the default options as values.
Example:
def self.platform_defaults
{ 'install' => '--no-rdoc --no-ri --env-shebang', 'update' => '--no-rdoc --no-ri --env-shebang' }
end
Invoked to wake up Fiber
previously blocked with block
(for example, Mutex#lock
calls block
and Mutex#unlock
calls unblock
). The scheduler should use the fiber
parameter to understand which fiber is unblocked.
blocker
is what was awaited for, but it is informational only (for debugging and logging), and it is not guaranteed to be the same value as the blocker
for block
.
Like Enumerable#reject
, but chains operation to be lazy-evaluated.
Like Enumerable#chunk
, but chains operation to be lazy-evaluated.
Like Enumerable#uniq
, but chains operation to be lazy-evaluated.
Returns a printable version of the enumerator chain.
Convert this arithmetic sequence to a printable form.
Returns a string formatted with an easily readable representation of the internal state of the pointer.
Initializes the Cipher
for encryption.
Make sure to call Cipher#encrypt
or Cipher#decrypt
before using any of the following methods:
Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 1).
Indicated whether this Cipher
instance uses an Authenticated Encryption mode.
String
representation of this configuration object, including the class name and its sections.
Returns the authentication code as a hex-encoded string. The digest parameter specifies the digest algorithm to use. This may be a String
representing the algorithm name or an instance of OpenSSL::Digest
.
key = 'key' data = 'The quick brown fox jumps over the lazy dog' hmac = OpenSSL::HMAC.hexdigest('sha1', key, data) #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
Pretty prints this engine.