Top Description Inners Fields Constructors Methods
org.jruby

public Class RubyKernel

extends Object
Class Inheritance
Annotations
@JRubyModule
name:Kernel
Imports
java.io.ByteArrayOutputStream, java.math.BigInteger, java.util.ArrayList, .Arrays, .Map, java.util.concurrent.TimeUnit, jnr.constants.platform.Errno, jnr.posix.POSIX, org.jcodings.specific.USASCIIEncoding, org.jruby.anno.FrameField, .JRubyMethod, .JRubyModule, org.jruby.api.Warn, org.jruby.ast.util.ArgsUtil, org.jruby.common.IRubyWarnings, .RubyWarnings, org.jruby.exceptions.CatchThrow, .MainExitException, .RaiseException, org.jruby.internal.runtime.GlobalVariables, org.jruby.internal.runtime.methods.DynamicMethod, .JavaMethod, .JavaMethod.JavaMethodNBlock, org.jruby.ir.interpreter.Interpreter, org.jruby.ir.operands.UndefinedValue, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.java.proxies.ConcreteJavaProxy, org.jruby.platform.Platform, org.jruby.runtime.Arity, .Binding, .Block, .CallType, .Helpers, .JavaSites.KernelSites, .MethodIndex, .ThreadContext, .Visibility, org.jruby.runtime.backtrace.RubyStackTraceElement, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CacheEntry, .CachingCallSite, org.jruby.util.ArraySupport, .ByteList, .ConvertBytes, .ShellLauncher, .TypeConverter, org.jruby.util.cli.Options, org.jruby.util.func.ObjectIntIntFunction, org.jruby.util.io.OpenFile, .PopenExecutor

Note

For CVS history, see KernelModule.java.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static BigInteger
private static BigInteger
private static final ByteList
private static final ByteList

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
abort(ThreadContext context, IRubyObject recv, IRubyObject[] args)

public static IRubyObject
at_exit(ThreadContext context, IRubyObject recv, Block block)

public static IRubyObject
autoload(ThreadContext context, final IRubyObject recv, IRubyObject symbol, IRubyObject file)

public static IRubyObject
autoload(final IRubyObject recv, IRubyObject symbol, IRubyObject file)
Deprecated

public static IRubyObject
autoload_p(ThreadContext context, final IRubyObject recv, IRubyObject symbol)

public static IRubyObject
public static RubyBinding
binding(ThreadContext context, IRubyObject recv, Block block)

public static RubyBoolean
public static RubyBoolean
blockGiven(ThreadContext context, IRubyObject recv, Block frameBlock)

private static RubyString
buildWarnMessage(ThreadContext context, final int uplevel, final IRubyObject arg)

public static IRubyObject
public static IRubyObject
public static IRubyObject
caller(ThreadContext context, IRubyObject recv, IRubyObject level, IRubyObject length)

private static IRubyObject
caller(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Deprecated

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
caller_locations(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

private static IRubyObject
private static IRubyObject
private static boolean
pack-priv static void
private static RubyException
public static IRubyObject
public static IRubyObject
private static IRubyObject[]
public static IRubyObject
public static IRubyObject
eql_p(IRubyObject self, IRubyObject obj)
Deprecated since 10.0.

public static IRubyObject
public static IRubyObject
eval(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

private static IRubyObject
public static IRubyObject
exec(ThreadContext context, IRubyObject recv, IRubyObject[] args)

private static IRubyObject
public static IRubyObject
exit(IRubyObject recv, IRubyObject[] args)
Deprecated

public static IRubyObject
exit(ThreadContext context, IRubyObject recv, IRubyObject[] args)

private static RuntimeException
exit(ThreadContext context, IRubyObject[] args, boolean hard)

public static IRubyObject
exit_bang(IRubyObject recv, IRubyObject[] args)
Deprecated

public static IRubyObject
public static IRubyObject
extend(IRubyObject self, IRubyObject[] args)
Deprecated

public static IRubyObject
public static RubyModule
private static RaiseException
public static IRubyObject
fork(ThreadContext context, IRubyObject recv, Block block)

public static IRubyObject
public static RubyBoolean
private static Binding
public static IRubyObject
getc(ThreadContext context, IRubyObject recv)
Deprecated since 10.0.

private static RubyString

Returns:

value of $_ as String.
getLastlineString
(ThreadContext context)

Returns value of $_.

private static String
public static IRubyObject
gets(ThreadContext context, IRubyObject recv, IRubyObject[] args)

private static int
public static RubyArray<T extends IRubyObject>

Returns:

an Array with the names of all global variables.
global_variables
(ThreadContext context, IRubyObject recv)

public static IRubyObject
gsub(ThreadContext context, IRubyObject recv, IRubyObject arg0, Block block)

public static IRubyObject
gsub(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1, Block block)

public static RubyFixnum
hash(IRubyObject self)
Deprecated since 10.0.

public static RubyFixnum
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
inspect(IRubyObject self)
Deprecated since 10.0.

public static IRubyObject
public static RubyBoolean
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static RubyArray<T extends IRubyObject>
public static IRubyObject
public static RubyBoolean
public static RubyProc
lambda(ThreadContext context, IRubyObject recv, Block block)

public static IRubyObject
load(ThreadContext context, IRubyObject recv, IRubyObject path, Block block)

public static IRubyObject
load(ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject wrap, Block block)

public static IRubyObject
load(IRubyObject recv, IRubyObject[] args, Block block)
Deprecated since 9.4-.

public static IRubyObject
load(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

private static IRubyObject
loadCommon(ThreadContext context, RubyString path, boolean wrap)

private static IRubyObject
public static RubyArray<T extends IRubyObject>

Returns:

an Array with the names of all local variables.
local_variables
(ThreadContext context, IRubyObject recv)

public static IRubyObject
loop(ThreadContext context, IRubyObject recv, Block block)

private static IRubyObject
loopSize(ThreadContext context, IRubyObject self, IRubyObject[] args)

A loop size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

private static void
maybeRaiseJavaException(ThreadContext context, final IRubyObject[] args, final int argc)

private static void
public static IRubyObject
public static IRubyObject
method(IRubyObject self, IRubyObject symbol)
Deprecated

public static IRubyObject
public static IRubyObject
methodMissing(ThreadContext context, IRubyObject recv, String name, Visibility lastVis, CallType lastCallType, IRubyObject[] args)

public static IRubyObject
methodMissing(ThreadContext context, IRubyObject recv, String name, Visibility lastVis, CallType lastCallType, IRubyObject[] args, boolean dropFirst)

public static IRubyObject
methodMissing(ThreadContext context, IRubyObject recv, String name, Visibility lastVis, CallType lastCallType, IRubyObject[] args, Block block)
Deprecated

protected static IRubyObject
methodMissingDirect(ThreadContext context, IRubyObject recv, RubySymbol symbol, Visibility lastVis, CallType lastCallType, IRubyObject[] args)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static RubyFloat
new_float(IRubyObject recv, IRubyObject object)
Deprecated since 10.0.

public static RubyFloat
new_float(final Ruby runtime, IRubyObject object)
Deprecated since 10.0.

public static RubyFloat
public static IRubyObject
new_float(ThreadContext context, IRubyObject object, boolean exception)

pack-priv static RubyFloat
public static IRubyObject
public static IRubyObject
public static IRubyObject
new_integer(ThreadContext context, IRubyObject recv, IRubyObject object, IRubyObject baseOrOpts)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
obj_to_enum(final ThreadContext context, IRubyObject self, IRubyObject[] args, final Block block)

public static IRubyObject
private static IRubyObject
objectSize(ThreadContext context, IRubyObject self, IRubyObject[] args)

An exactly-one size method suitable for lambda method reference implementation of SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

public static IRubyObject
public static IRubyObject
public static IRubyObject
op_match(ThreadContext context, IRubyObject self, IRubyObject arg)
Deprecated

public static IRubyObject
public static IRubyObject
open(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static IRubyObject
p(ThreadContext context, IRubyObject recv, IRubyObject[] args)

public static double
parseHexidecimalExponentString2(Ruby runtime, ByteList str)
Deprecated since 10.0.

public static double

Returns:

the result.
parseHexidecimalExponentString2
(ThreadContext context, ByteList
the bytelist to be parsed
str
)

Parse hexidecimal exponential notation: ... This method assumes the string is a valid-formatted string.

private static IRubyObject
pBody(ThreadContext context, IRubyObject[] args)

private static void
public static IRubyObject
public static IRubyObject
public static RubyProc
proc(ThreadContext context, IRubyObject recv, Block block)

public static RubyProc
proc_1_9(ThreadContext context, IRubyObject recv, Block block)
Deprecated

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public_send(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static IRubyObject
putc(ThreadContext context, IRubyObject recv, IRubyObject ch)

rb_f_putc

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
puts(ThreadContext context, IRubyObject recv, IRubyObject[] args)

public static IRubyObject
public static IRubyObject
raise(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static IRubyObject
public static IRubyObject
public static IRubyObject
rand(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

public static IRubyObject
rbCatch(ThreadContext context, IRubyObject recv, Block block)

public static IRubyObject
rbCatch(ThreadContext context, IRubyObject recv, IRubyObject tag, Block block)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
rbThrow(ThreadContext context, IRubyObject recv, IRubyObject tag, Block block)

public static IRubyObject
rbThrow(ThreadContext context, IRubyObject recv, IRubyObject tag, IRubyObject value, Block block)

private static IRubyObject
public static IRubyObject
public static IRubyObject
pack-priv static void
recacheBuiltinMethods(Ruby runtime, RubyModule kernelModule)

Cache built-in versions of several core methods, to improve performance by using identity comparison (==) rather than going ahead with dynamic dispatch.

public static IRubyObject
public static IRubyObject
require(ThreadContext context, IRubyObject
ruby object used to call require (any object will do and it won't be used anyway).
recv
,
IRubyObject
the name of the file to require
name
,
Block block)

Require.

public static IRubyObject
require(IRubyObject recv, IRubyObject name, Block block)
Deprecated

public static IRubyObject
private static IRubyObject
public static IRubyObject
public static IRubyObject
public static RubyBoolean
respond_to_p(IRubyObject self, IRubyObject mname)
Deprecated

public static RubyBoolean
respond_to_p(IRubyObject self, IRubyObject mname, IRubyObject includePrivate)
Deprecated

public static IRubyObject
public static IRubyObject
respond_to_p(ThreadContext context, IRubyObject self, IRubyObject name, IRubyObject includePrivate)

public static IRubyObject
public static IRubyObject
send(ThreadContext context, IRubyObject self, IRubyObject arg0, Block block)

public static IRubyObject
send(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block)

public static IRubyObject
send(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)

public static IRubyObject
send(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)

public static IRubyObject
set_trace_func(ThreadContext context, IRubyObject recv, IRubyObject trace_func, Block block)

public static IRubyObject
singleton_class(IRubyObject recv)
Deprecated since 10.0.

public static IRubyObject
public static IRubyObject
singleton_method(IRubyObject self, IRubyObject symbol)
Deprecated since 10.0.

public static IRubyObject
public static RubyArray<T extends IRubyObject>
private static JavaSites.KernelSites
public static IRubyObject
public static IRubyObject
sleep(ThreadContext context, IRubyObject recv, IRubyObject timeout)

public static IRubyObject
sleep(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

private static RubyFixnum
sleepCommon(ThreadContext context, long nanoseconds)

public static RubyFixnum
spawn(ThreadContext context, IRubyObject recv, IRubyObject[] args)

public static IRubyObject
public static IRubyObject
sprintf(IRubyObject recv, IRubyObject[] args)
Deprecated

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
private static int
public static IRubyObject
tap(ThreadContext context, IRubyObject recv, Block block)
Deprecated

public static IRubyObject
public static IRubyObject
public static IRubyObject
test(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

private static IRubyObject
testCommon(ThreadContext context, IRubyObject recv, int cmd, IRubyObject arg1, IRubyObject arg2)

public static IRubyObject
to_s(IRubyObject self)
Deprecated since 10.0.

public static IRubyObject
public static IRubyObject
trace_var(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static RubyClass
private static RaiseException
public static IRubyObject
untrace_var(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static IRubyObject
public static IRubyObject
warn(ThreadContext context, IRubyObject recv, IRubyObject[] args)

private static void
pack-priv static void
warnStr(ThreadContext context, IRubyObject recv, RubyString message, IRubyObject category)

pack-priv static <R> R
withLevelAndLength(ThreadContext context, IRubyObject level, IRubyObject length, int defaultLevel, ObjectIntIntFunction<ThreadContext, R> func)

Retrieve the level and length from given args, if non-null.

public static IRubyObject
yield_self(ThreadContext context, IRubyObject recv, Block block)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait