Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

RubyVM.stat

RubyVM.stat → Hash
RubyVM.stat(hsh) → hsh
RubyVM.stat(Symbol) → Numeric

Returns a Hash containing implementation-dependent counters inside the VM.

This hash includes information about method/constant cache serials:

Example
{
  :global_constant_state=>481,
  :class_serial=>9029
}

The contents of the hash are implementation specific and may be changed in the future.

This method is only expected to work on C Ruby.

See also .mtbl2 .mtbl also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1