Returns the version of the latest release-version of gem name
Register a Gem::Specification
for default gem.
Two formats for the specification are supported:
MRI 2.0 style, where spec.files contains unprefixed require names. The spec’s filenames will be registered as-is.
New style, where spec.files contains files prefixed with paths from spec.require_paths. The prefixes are stripped before registering the spec’s filenames. Unprefixed files are omitted.
Invoked by any method that performs a non-reverse DNS lookup. The most notable method is Addrinfo.getaddrinfo
, but there are many other.
The method is expected to return an array of strings corresponding to ip addresses the hostname
is resolved to, or nil
if it can not be resolved.
Fairly exhaustive list of all possible call-sites:
Addrinfo.marshal_load
Like Enumerable#slice_before
, but chains operation to be lazy-evaluated.
ptr.to_str => string ptr.to_str(len) => string
Returns the pointer contents as a string.
When called with no arguments, this method will return the contents with the length of this pointer’s size
.
When called with len
, a string of len
bytes will be returned.
See to_s
Performs a Miller-Rabin probabilistic primality test for bn
.
Deprecated in version 3.0. Use prime?
instead.
checks
and trial_div
parameters no longer have any effect.
Emit a scalar with value
and tag
Emit a sequence with list
and tag
Emit a sequence with map
and tag
Emit an arbitrary object obj
and tag
Called when the YAML
stream ends
Returns true if the stream is finished.
Returns true
if stat is readable by the real user id of this process.
File.stat("testfile").readable_real? #=> true
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"