Kernel Module
These public methods are in the Kernel module, the module that is included in the Object class, the base class of Ruby. This documentation is adapted and abbreviated from http://www.ruby-doc.org/core/classes/Kernel.html, where you can find code examples and longer explanations:
Array(arg)Returns
argas anArray.Float(arg)Returns
argconverted to a float.Integer(arg)Converts
argto aFixnumorBignum.String(arg)Converts
argto aStringby calling itsto_smethod.URI(uri_str)Alias for
URI.parse.- '
cmd' Returns the standard output of running
cmdin a subshell.abort[or]Kernel::abort[or]Process::abortTerminate execution immediately, effectively by calling
Kernel.exit(1).at_exit {block}Converts block to a
Procobject (and therefore binds it at the point of call) and registers it for execution when the program exits.autoload(module,filename)Registers
filenameto be loaded (usingKernel::require) the first time that module—which may be aStringor a symbol—is accessed.bindingReturns a
Bindingobject, describing the variable and method bindings at the point of call.block_given?[or]iterator?Returns
trueifyieldwould execute a block in the current context. Theiterator?form is mildly deprecated.callcc {|cont|block }Generates a continuation object, which it passes to the associated block.
caller(start=1)Returns the current execution stack—an array containing strings in the form
file:lineorfile:line:in method. The optionalstartparameter determines the number of initial ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access