Results for: "tally"

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Returns true if this gem is installable for the current platform.

Returns true if this gem is installable for the current platform.

Returns true if this specification is installable on this platform.

Compile a CallTargetNode node

Dispatch enter and leave events for CallTargetNode nodes and continue walking the tree.

Inspect a CallTargetNode node.

Copy a CallTargetNode node

No documentation available

Returns true if the document is valid with all lines removed. By default it checks all blocks in present in the frontier array, but can be used for arbitrary arrays of codeblocks as well

Add the install/update options to the option parser.

Default description for the gem install and update commands.

Returns whether Happy Eyeballs Version 2 (RFC 8305), which is provided starting from Ruby 3.4 when using TCPSocket.new and Socket.tcp, is enabled or disabled.

If true, it is enabled for TCPSocket.new and Socket.tcp. (Note: Happy Eyeballs Version 2 is not provided when using TCPSocket.new on Windows.)

If false, Happy Eyeballs Version 2 is disabled.

For details on Happy Eyeballs Version 2, see Socket.tcp_fast_fallback=.

Enable or disable Happy Eyeballs Version 2 (RFC 8305) globally, which is provided starting from Ruby 3.4 when using TCPSocket.new and Socket.tcp.

When set to true, the feature is enabled for both ‘TCPSocket.new` and `Socket.tcp`. (Note: This feature is not available when using TCPSocket.new on Windows.)

When set to false, the behavior reverts to that of Ruby 3.3 or earlier.

The default value is true if no value is explicitly set by calling this method. However, when the environment variable RUBY_TCP_NO_FAST_FALLBACK=1 is set, the default is false.

To control the setting on a per-method basis, use the fast_fallback keyword argument for each method.

Happy Eyeballs Version 2

Happy Eyeballs Version 2 (RFC 8305) is an algorithm designed to improve client socket connectivity.
It aims for more reliable and efficient connections by performing hostname resolution and connection attempts in parallel, instead of serially.

Starting from Ruby 3.4, this method operates as follows with this algorithm:

  1. Start resolving both IPv6 and IPv4 addresses concurrently.

  2. Start connecting to the one of the addresses that are obtained first.
    If IPv4 addresses are obtained first, the method waits 50 ms for IPv6 name resolution to prioritize IPv6 connections.

  3. After starting a connection attempt, wait 250 ms for the connection to be established.
    If no connection is established within this time, a new connection is started every 250 ms
    until a connection is established or there are no more candidate addresses.
    (Although RFC 8305 strictly specifies sorting addresses,
    this method only alternates between IPv6 / IPv4 addresses due to the performance concerns)



  4. Once a connection is established, all remaining connection attempts are canceled.

No documentation available

Yields each frame of the current execution stack as a backtrace location object.

Starts tracing object allocations from the ObjectSpace extension module.

For example:

require 'objspace'

class C
  include ObjectSpace

  def foo
    trace_object_allocations do
      obj = Object.new
      p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}"
    end
  end
end

C.new.foo #=> "objtrace.rb:8"

This example has included the ObjectSpace module to make it easier to read, but you can also use the ::trace_object_allocations notation (recommended).

Note that this feature introduces a huge performance decrease and huge memory consumption.

Returns the class for the given object.

class A
  def foo
    ObjectSpace::trace_object_allocations do
      obj = Object.new
      p "#{ObjectSpace::allocation_class_path(obj)}"
    end
  end
end

A.new.foo #=> "Class"

See ::trace_object_allocations for more information and examples.

Returns the method identifier for the given object.

class A
  include ObjectSpace

  def foo
    trace_object_allocations do
      obj = Object.new
      p "#{allocation_class_path(obj)}##{allocation_method_id(obj)}"
    end
  end
end

A.new.foo #=> "Class#new"

See ::trace_object_allocations for more information and examples.

Search took: 4ms  ·  Total Results: 1908