Removes an object from the set of objects being pretty printed.
Creates a self-signed certificate with an issuer and subject from email
, a subject alternative name of email
and the given extensions
for the key
.
Turns email_address
into an OpenSSL::X509::Name
Deprecation method to deprecate Rubygems commands
Deprecation method to deprecate Rubygems commands
Default options for the gem install and update commands.
If the stream begins with a BOM (byte order marker), consumes the BOM and sets the external encoding accordingly; returns the result encoding if found, or nil
otherwise:
File.write('t.tmp', "\u{FEFF}abc") io = File.open('t.tmp', 'rb') io.set_encoding_by_bom # => #<Encoding:UTF-8> io.close File.write('t.tmp', 'abc') io = File.open('t.tmp', 'rb') io.set_encoding_by_bom # => nil io.close
Raises an exception if the stream is not binmode or its encoding has already been set.
Sets the encoding according to the BOM (Byte Order Mark) in the string.
Returns self
if the BOM is found, otherwise +nil.
Returns the last win32 socket Error
of the current executing Thread
or nil if none
Sets the last win32 socket Error
of the current executing Thread
to error
If the SOURCE_DATE_EPOCH environment variable is set, returns it’s value. Otherwise, returns the time that Gem.source_date_epoch_string
was first called in the same format as SOURCE_DATE_EPOCH.
NOTE(@duckinator): The implementation is a tad weird because we want to:
1. Make builds reproducible by default, by having this function always return the same result during a given run. 2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple tests that set this variable will be run in a single process.
If you simplify this function and a lot of tests fail, that is likely due to #2 above.
Details on SOURCE_DATE_EPOCH: reproducible-builds.org/specs/source-date-epoch/
Find
an unresolved Gem::Specification
of default gem from path
Initializes this object from orig if it can be duplicated/cloned and returns it.
Constructs a new source range by finding the given tokens between the given start offset and end offset. If the needle is not found, it returns nil. Importantly it does not search past newlines or comments.
Note that end_offset is allowed to be nil, in which case this will search until the end of the string.
Within the given block, track that we’re within a pattern.
Parse an integer from the string representation.