Returns the bound receiver of the binding object.
Returns the bound receiver of the method object.
When RubyGems is required, Kernel#require
is replaced with our own which is capable of loading gems on demand.
When you call require 'x'
, this is what happens:
If the file can be loaded from the existing Ruby loadpath, it is.
Otherwise, installed gems are searched for a file that matches. If it’s found in gem ‘y’, that gem is activated (added to the loadpath).
The normal require
functionality of returning false if that file has already been loaded is preserved.
Refresh available gems from disk.
Performs a Miller-Rabin primality test. This is same as prime?
except this first attempts trial divisions with some small primes.
checks - integer
trial_div - boolean
Parses the configuration data read from io, see also parse.
Raises a ConfigError
on invalid configuration data.
Returns a hash of default options used by the Ruby iseq compiler.
For details, see InstructionSequence.compile_option=
.
Sets the default values for various optimizations in the Ruby iseq compiler.
Possible values for options
include true
, which enables all options, false
which disables all options, and nil
which leaves all options unchanged.
You can also pass a Hash
of options
that you want to change, any options not present in the hash will be left unchanged.
Possible option names (which are keys in options
) which can be set to true
or false
include:
:inline_const_cache
:instructions_unification
:operands_unification
:peephole_optimization
:specialized_instruction
:stack_caching
:tailcall_optimization
Additionally, :debug_level
can be set to an integer.
These default options can be overwritten for a single run of the iseq compiler by passing any of the above values as the options
parameter to ::new
, ::compile
and ::compile_file
.
Setter for the continue_timeout
attribute.
Parses argument, converts and returns arg
, block
and result of conversion. Yields at semi-error condition instead of raising an exception.
@return the XMLDecl
standalone value of this document as a String. If no XMLDecl
has been set, returns the default setting.
Returns full path to the directory where gem’s extensions are installed.
Merge a set of command options with the set of default options (without modifying the default option hash).
Handle the given list of arguments by parsing them and recording the results.
Install generated indices into the destination directory.
Return an Array of Specifications contained within the gem_home
we’ll be installing into.
Creates an installer for spec
that will install into gem_home
. If user
is true a user-install will be performed.
Specifies the rdoc options to be used when generating API documentation.
Usage:
spec.rdoc_options << '--title' << 'Rake -- Ruby Make' << '--main' << 'README' << '--line-numbers'