Returns the size of memory allocated by malloc().
Only available if ruby was built with CALC_EXACT_MALLOC_SIZE
.
Verify compaction reference consistency.
This method is implementation specific. During compaction, objects that were moved are replaced with T_MOVED objects. No object should have a reference to a T_MOVED object after compaction.
This function expands the heap to ensure room to move all objects, compacts the heap to make sure everything moves, updates all references, then performs a full GC. If any object contains a reference to a T_MOVED object, that object should be pushed on the mark stack, and will make a SEGV.
The file name and line number of the caller of the caller of this method.
depth
is how many layers up the call stack it should go.
e.g.,
def a; Gem.location_of_caller
; end a #=> [“x.rb”, 2] # (it’ll vary depending on file name and line number)
def b; c; end def c; Gem.location_of_caller(2)
; end b #=> [“x.rb”, 6] # (it’ll vary depending on file name and line number)
Returns the latest release version of RubyGems.
Like Enumerable#select
, but chains operation to be lazy-evaluated.
Generates a random prime number of bit length bits. If safe is set to true
, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem
.
Translates and dispatches Windows message.
Returns a DRb::DRbSSLSocket
instance as a server-side connection, with the SSL connected. This is called from DRb::start_service
or while connecting to a remote object:
DRb.start_service 'drbssl://localhost:0', front, config
uri
is the URI
we are connected to, 'drbssl://localhost:0'
above, config
is our configuration. Either a Hash
or DRb::DRbSSLSocket::SSLConfig
Returns the X.509 certificates the server presented.
Returns a valid argument to make_expires
and the renewer or nil.
Given true
, nil
, or Numeric
, returns that value and nil
(no actual renewer). Otherwise it returns an expiry value from calling it.renew
and the renewer.
Merge a set of command options with the set of default options (without modifying the default option hash).
Indicated, based on the requested domain, if local gems should be considered.
Builds and installs indices.