Get the address of the code associated with a YJIT::Block
@param [Array<Object>] binding_requirements array of requirements that combine to create a conflict @return [Array<UnwindDetails>] array of UnwindDetails
that have a chance
of resolving the passed requirements
@param [Conflict] conflict @return [Array] minimal array of requirements that would cause the passed
conflict to occur.
@macro action
@return [Set<Vertex>] the vertices of {#graph} where ‘self` is an
{#ancestor?}
@param [Set<Vertex>] vertices the set to add the successors to @return [Set<Vertex>] the vertices of {#graph} where ‘self` is an
{#ancestor?}
Sets up the resolution process @return [void]
@return [Integer] index of state requirement in reversed requirement tree
(the conflicting requirement itself will be at position 0)
Ruby expects the dylib to follow a file name convention for loading
Invoked by IO#read
to read length
bytes from io
into a specified buffer
(see IO::Buffer
).
The length
argument is the “minimum length to be read”. If the IO
buffer size is 8KiB, but the length
is 1024
(1KiB), up to 8KiB might be read, but at least 1KiB will be. Generally, the only case where less data than length
will be read is if there is an error reading the data.
Specifying a length
of 0 is valid and means try reading at least once and return any available data.
Suggested implementation should try to read from 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 return data.
Expected to return number of bytes read, or, in case of an error, -errno
(negated number corresponding to system’s error code).
The method should be considered experimental.
Similar to Object#to_enum
, except it returns a lazy enumerator. This makes it easy to define Enumerable
methods that will naturally remain lazy if called from a lazy enumerator.
For example, continuing from the example in Object#to_enum
:
# See Object#to_enum for the definition of repeat r = 1..Float::INFINITY r.repeat(2).first(5) # => [1, 1, 2, 2, 3] r.repeat(2).class # => Enumerator r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! # works naturally on lazy enumerator: r.lazy.repeat(2).class # => Enumerator::Lazy r.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9]
Similar to Object#to_enum
, except it returns a lazy enumerator. This makes it easy to define Enumerable
methods that will naturally remain lazy if called from a lazy enumerator.
For example, continuing from the example in Object#to_enum
:
# See Object#to_enum for the definition of repeat r = 1..Float::INFINITY r.repeat(2).first(5) # => [1, 1, 2, 2, 3] r.repeat(2).class # => Enumerator r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! # works naturally on lazy enumerator: r.lazy.repeat(2).class # => Enumerator::Lazy r.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9]
Like Enumerable#reject
, but chains operation to be lazy-evaluated.
Like Enumerable#grep
, but chains operation to be lazy-evaluated.
Like Enumerable#grep_v
, but chains operation to be lazy-evaluated.
Returns a Proc
object that takes arguments and yields them.
This method is implemented so that a Yielder
object can be directly passed to another method as a block argument.
enum = Enumerator.new { |y| Dir.glob("*.rb") { |file| File.open(file) { |f| f.each_line(&y) } } }
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.
Turn this function in to a proc
Returns the Fiddle::Pointer
of this handle.
Get the underlying pointer for ruby object val
and return it as a Fiddle::Pointer
object.