public final class Ruby
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
Ruby.CallTraceFuncHook |
private static class |
Ruby.ExecRecursiveParams |
static interface |
Ruby.ObjectSpacer |
private static class |
Ruby.RecursiveError |
static interface |
Ruby.RecursiveFunction |
| Modifier and Type | Field and Description |
|---|---|
private static java.util.regex.Pattern |
ADDR_NOT_AVAIL_PATTERN |
private java.util.Set<RubyModule> |
allModules |
private IRubyObject |
argsFile |
private RubyClass |
argumentError
All the core classes we keep hard references to.
|
private RubyClass |
arrayClass
All the core classes we keep hard references to.
|
private java.util.Stack<RubyProc> |
atExitBlocks |
private java.util.concurrent.atomic.AtomicInteger |
backtraceCount |
private RubyClass |
basicObjectClass
All the core classes we keep hard references to.
|
private BeanManager |
beanManager |
private RubyClass |
bignumClass
All the core classes we keep hard references to.
|
private RubyClass |
bindingClass
All the core classes we keep hard references to.
|
private boolean |
booting |
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
boundMethods |
private java.util.concurrent.atomic.AtomicInteger |
callerCount |
private Ruby.CallTraceFuncHook |
callTraceFuncHook |
private RubyHash |
charsetMap |
private Invalidator |
checkpointInvalidator |
private ClassCache |
classCacheBean |
private RubyClass |
classClass
All the core classes we keep hard references to.
|
private RubyModule |
comparableModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
complexClass
All the core classes we keep hard references to.
|
private RubyClass |
concurrencyError
All the core classes we keep hard references to.
|
private RubyInstanceConfig |
config |
private Config |
configBean |
private java.util.concurrent.ConcurrentHashMap<java.lang.String,Invalidator> |
constantNameInvalidators |
private RubyClass |
continuationClass
All the core classes we keep hard references to.
|
private RubyClass |
converterClass
All the core classes we keep hard references to.
|
private RubyClass |
converterNotFoundError
All the core classes we keep hard references to.
|
private CoverageData |
coverageData |
private java.lang.String |
currentDirectory |
private int |
currentLine |
private boolean |
debug |
private org.jcodings.Encoding |
defaultExternalEncoding |
private org.jcodings.Encoding |
defaultInternalEncoding |
private DynamicMethod |
defaultMethodMissing |
private RubyRandom.RandomType |
defaultRand |
private RubyThreadGroup |
defaultThreadGroup |
private java.util.EnumMap<DefinedMessage,RubyString> |
definedMessages |
private RubyClass |
dirClass
All the core classes we keep hard references to.
|
private static Ruby.ObjectSpacer |
DISABLED_OBJECTSPACE |
private boolean |
doNotReverseLookupEnabled |
private RubyClass |
dummyClass
All the core classes we keep hard references to.
|
private java.util.concurrent.atomic.AtomicLong |
dynamicMethodSerial |
private static EventHook[] |
EMPTY_HOOKS |
private RubyArray |
emptyFrozenArray |
private static Ruby.ObjectSpacer |
ENABLED_OBJECTSPACE |
private RubyClass |
encodingClass
All the core classes we keep hard references to.
|
private RubyClass |
encodingCompatibilityError
All the core classes we keep hard references to.
|
private RubyClass |
encodingError
All the core classes we keep hard references to.
|
private EncodingService |
encodingService |
private RubyModule |
enumerableModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
enumeratorClass
All the core classes we keep hard references to.
|
private RubyHash |
envObject |
private RubyClass |
eofError
All the core classes we keep hard references to.
|
private java.io.PrintStream |
err |
static java.lang.String |
ERRNO_BACKTRACE_MESSAGE |
private RubyModule |
errnoModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private java.util.Map<java.lang.Integer,RubyClass> |
errnos |
private RubyModule |
etcModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private EventHook[] |
eventHooks |
private static java.util.EnumSet<RubyEvent> |
EVENTS2_0 |
private RubyClass |
exceptionClass
All the core classes we keep hard references to.
|
private java.util.concurrent.atomic.AtomicInteger |
exceptionCount |
private java.util.concurrent.ExecutorService |
executor |
private RubyClass |
falseClass
All the core classes we keep hard references to.
|
private RubyBoolean |
falseObject |
private RubyClass |
fatal
All the core classes we keep hard references to.
|
private FFI |
ffi |
private RubyClass |
fiberError
All the core classes we keep hard references to.
|
private java.util.concurrent.ExecutorService |
fiberExecutor |
private RubyClass |
fileClass
All the core classes we keep hard references to.
|
private java.util.Map<java.lang.Integer,java.lang.Integer> |
filenoExtIntMap |
private java.util.Map<java.lang.Integer,java.lang.Integer> |
filenoIntExtMap |
private RubyClass |
fileStatClass
All the core classes we keep hard references to.
|
private RubyModule |
fileTestModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private java.util.Map<Finalizable,java.lang.Object> |
finalizers
A list of "external" finalizers (the ones, registered via ObjectSpace),
weakly referenced, to be executed on tearDown.
|
private java.lang.Object |
finalizersMutex |
RubyFixnum[] |
fixnumCache |
private RubyClass |
fixnumClass
All the core classes we keep hard references to.
|
private Invalidator |
fixnumInvalidator |
private boolean |
fixnumReopened |
private RubyClass |
floatClass
All the core classes we keep hard references to.
|
private RubyClass |
floatDomainError
All the core classes we keep hard references to.
|
private Invalidator |
floatInvalidator |
private boolean |
floatReopened |
private RubyModule |
gcModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private boolean |
globalAbortOnExceptionEnabled |
private static Ruby |
globalRuntime
The "global" runtime.
|
private long |
globalState |
private GlobalVariables |
globalVariables |
private RubyClass |
groupStruct
All the core classes we keep hard references to.
|
private boolean |
hasEventHooks |
private RubyClass |
hashClass
All the core classes we keep hard references to.
|
private long |
hashSeedK0
The runtime-local seed for hash randomization
|
private long |
hashSeedK1 |
private java.lang.Object |
hierarchyLock |
private java.io.InputStream |
in |
private RubyClass |
indexError
All the core classes we keep hard references to.
|
private java.lang.ThreadLocal<java.lang.Boolean> |
inRecursiveListOperation |
private java.lang.ThreadLocal<java.util.Map<java.lang.Object,java.lang.Object>> |
inspect |
private RubyClass |
integerClass
All the core classes we keep hard references to.
|
private java.util.Map<Finalizable,java.lang.Object> |
internalFinalizers
A list of JRuby-internal finalizers, weakly referenced,
to be executed on tearDown.
|
private java.lang.Object |
internalFinalizersMutex |
private RubyClass |
interrupt
All the core classes we keep hard references to.
|
private RubyClass |
interruptedRegexpError
All the core classes we keep hard references to.
|
private RubyClass |
invalidByteSequenceError
All the core classes we keep hard references to.
|
private RubyClass |
ioClass
All the core classes we keep hard references to.
|
private RubyClass |
ioError
All the core classes we keep hard references to.
|
private IRManager |
irManager |
private boolean |
is1_9 |
private boolean |
is2_0 |
private JavaProxyClassFactory |
javaProxyClassFactory |
private JavaSupport |
javaSupport |
private JITCompiler |
jitCompiler |
private java.util.Set<Script> |
jittedMethods |
private JRubyClassLoader |
jrubyClassLoader |
private KCode |
kcode |
private RubyModule |
kernelModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
keyError
All the core classes we keep hard references to.
|
private RubyClass |
loadError
All the core classes we keep hard references to.
|
private LoadService |
loadService |
private RubyClass |
localJumpError
All the core classes we keep hard references to.
|
private RubyClass |
locationClass
All the core classes we keep hard references to.
|
private static Logger |
LOG
The logger used to log relevant bits.
|
private RubyModule |
marshalModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
matchDataClass
All the core classes we keep hard references to.
|
private RubyClass |
mathDomainError
All the core classes we keep hard references to.
|
private RubyModule |
mathModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
methodClass
All the core classes we keep hard references to.
|
private RubyClass |
moduleClass
All the core classes we keep hard references to.
|
private java.util.concurrent.atomic.AtomicInteger |
moduleGeneration |
private java.util.concurrent.atomic.AtomicInteger |
moduleLastId |
private RubyClass |
nameError
All the core classes we keep hard references to.
|
private RubyClass |
nameErrorMessage
All the core classes we keep hard references to.
|
private RubyClass |
nativeException
All the core classes we keep hard references to.
|
static int |
NIL_PREFILLED_ARRAY_SIZE |
private RubyClass |
nilClass
All the core classes we keep hard references to.
|
private RubyNil |
nilObject |
private IRubyObject[] |
nilPrefilledArray |
private RubyClass |
noMemoryError
All the core classes we keep hard references to.
|
private RubyClass |
noMethodError
All the core classes we keep hard references to.
|
private DynamicMethod |
normalMethodMissing |
private RubyClass |
notImplementedError
All the core classes we keep hard references to.
|
private RubyClass |
numericClass
All the core classes we keep hard references to.
|
private RubyClass |
objectClass
All the core classes we keep hard references to.
|
private ObjectSpace |
objectSpace |
private boolean |
objectSpaceEnabled |
private RubyModule |
objectSpaceModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private Ruby.ObjectSpacer |
objectSpacer |
private java.io.PrintStream |
out |
private Parser |
parser |
private ParserStats |
parserStats |
private RubyClass |
passwdStruct
All the core classes we keep hard references to.
|
private jnr.posix.POSIX |
posix |
private RubyModule |
precisionModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private DynamicMethod |
privateMethodMissing |
private RubyClass |
procClass
All the core classes we keep hard references to.
|
private RubyModule |
processModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyModule |
procGIDModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyClass |
procStatusClass
All the core classes we keep hard references to.
|
private RubyModule |
procSysModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private RubyModule |
procUIDModule
All the core modules we keep direct references to, for quick access and
to ensure they remain available.
|
private Profile |
profile |
private ProfiledMethods |
profiledMethods |
private ProfilingServiceLookup |
profilingServiceLookup
Used to find the ProfilingService implementation to use.
|
private DynamicMethod |
protectedMethodMissing |
private java.util.Random |
random
The runtime-local random number generator.
|
private RubyClass |
randomClass
All the core classes we keep hard references to.
|
private RubyClass |
rangeClass
All the core classes we keep hard references to.
|
private RubyClass |
rangeError
All the core classes we keep hard references to.
|
private RubyClass |
rationalClass
All the core classes we keep hard references to.
|
private GlobalVariable |
recordSeparatorVar |
private java.lang.ThreadLocal<java.util.Map<java.lang.String,RubyHash>> |
recursive |
private RubySymbol |
recursiveKey |
private RubyClass |
regexpClass
All the core classes we keep hard references to.
|
private RubyClass |
regexpError
All the core classes we keep hard references to.
|
private DynamicMethod |
respondTo |
private DynamicMethod |
respondToMissing |
private IRubyObject |
rootFiber |
private static java.util.concurrent.atomic.AtomicInteger |
RUNTIME_NUMBER |
private Runtime |
runtimeBean |
private RuntimeCache |
runtimeCache |
private RubyClass |
runtimeError
All the core classes we keep hard references to.
|
private int |
runtimeNumber |
private RubyClass |
scriptError
All the core classes we keep hard references to.
|
private RubyClass |
securityError
All the core classes we keep hard references to.
|
private static boolean |
securityRestricted |
private SelectorPool |
selectorPool |
private RubyClass |
signalException
All the core classes we keep hard references to.
|
private IRubyObject[] |
singleNilArray |
private boolean |
siphashEnabled |
private RubyClass |
standardError
All the core classes we keep hard references to.
|
private long |
startTime |
private StaticScopeFactory |
staticScopeFactory |
static java.lang.String |
STOPIERATION_BACKTRACE_MESSAGE |
private RubyClass |
stopIteration
All the core classes we keep hard references to.
|
private RubyClass |
stringClass
All the core classes we keep hard references to.
|
private RubyClass |
structClass
All the core classes we keep hard references to.
|
private DynamicMethod |
superMethodMissing |
private RubyClass |
symbolClass
All the core classes we keep hard references to.
|
private java.util.concurrent.atomic.AtomicInteger |
symbolLastId |
private RubySymbol.SymbolTable |
symbolTable |
private RubyClass |
syntaxError
All the core classes we keep hard references to.
|
private RubyClass |
systemCallError
All the core classes we keep hard references to.
|
private RubyClass |
systemExit
All the core classes we keep hard references to.
|
private RubyClass |
systemStackError
All the core classes we keep hard references to.
|
private RubyClass |
threadClass
All the core classes we keep hard references to.
|
private RubyClass |
threadError
All the core classes we keep hard references to.
|
private RubyClass |
threadGroupClass
All the core classes we keep hard references to.
|
private static java.lang.ThreadLocal<Ruby> |
threadLocalRuntime
The "thread local" runtime.
|
private ThreadService |
threadService |
private java.util.EnumMap<RubyThread.Status,RubyString> |
threadStatuses |
private RubyClass |
timeClass
All the core classes we keep hard references to.
|
private java.util.Map<java.lang.String,org.joda.time.DateTimeZone> |
timeZoneCache |
private RubyClass |
tmsStruct
All the core classes we keep hard references to.
|
private IRubyObject |
topSelf |
private RubyClass |
trueClass
All the core classes we keep hard references to.
|
private RubyBoolean |
trueObject |
private RubyClass |
typeError
All the core classes we keep hard references to.
|
private RubyClass |
unboundMethodClass
All the core classes we keep hard references to.
|
private RubyClass |
undefinedConversionError
All the core classes we keep hard references to.
|
private DynamicMethod |
variableMethodMissing |
private boolean |
verbose |
private IRubyObject |
verboseValue |
private java.util.concurrent.atomic.AtomicInteger |
warningCount |
private RubyWarnings |
warnings |
private boolean |
warningsEnabled |
private RubyClass |
yielderClass
All the core classes we keep hard references to.
|
private RubyClass |
zeroDivisionError
All the core classes we keep hard references to.
|
| Modifier | Constructor and Description |
|---|---|
private |
Ruby(RubyInstanceConfig config)
Create and initialize a new JRuby runtime.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBoundMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String rubyName) |
private void |
addBuiltinIfAllowed(java.lang.String name,
Library lib) |
private Invalidator |
addConstantInvalidator(java.lang.String constantName) |
void |
addEventHook(EventHook hook) |
void |
addFinalizer(Finalizable finalizer) |
void |
addInternalFinalizer(Finalizable finalizer) |
private void |
addLazyBuiltin(java.lang.String name,
java.lang.String shortName,
java.lang.String className) |
void |
addModule(RubyModule module) |
(package private) void |
addProfiledMethod(java.lang.String name,
DynamicMethod method)
Deprecated.
This should be an implementation detail of the ProfilingService and should remove from the Ruby class.
|
void |
addToObjectSpace(boolean useObjectSpace,
IRubyObject object) |
int |
allocModuleId() |
int |
allocSymbolId() |
private void |
bootstrap() |
CallbackFactory |
callbackFactory(java.lang.Class<?> type)
Deprecated.
|
void |
callEventHooks(ThreadContext context,
RubyEvent event,
java.lang.String file,
int line,
java.lang.String name,
IRubyObject type) |
void |
checkSafeString(IRubyObject object)
Deprecated.
|
static void |
clearGlobalRuntime()
Clear the global runtime.
|
void |
compileAndLoadFile(java.lang.String filename,
java.io.InputStream in,
boolean wrap) |
private void |
createSysErr(int i,
java.lang.String name)
Creates a system error.
|
RubyClass |
defineClass(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator)
Define a new class under the Object namespace.
|
RubyClass |
defineClass(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator,
CallSite[] callSites)
A variation of defineClass that allows passing in an array of subplementary
call sites for improving dynamic invocation performance.
|
private RubyClass |
defineClassIfAllowed(java.lang.String name,
RubyClass superClass) |
RubyClass |
defineClassUnder(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator,
RubyModule parent)
Define a new class with the given name under the given module or class
namespace.
|
RubyClass |
defineClassUnder(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator,
RubyModule parent,
CallSite[] callSites)
A variation of defineClassUnder that allows passing in an array of
supplementary call sites to improve dynamic invocation.
|
void |
defineGlobalConstant(java.lang.String name,
IRubyObject value)
rb_define_global_const
Define a constant on the global namespace (i.e.
|
RubyModule |
defineModule(java.lang.String name)
Define a new module under the Object namespace.
|
RubyModule |
defineModuleUnder(java.lang.String name,
RubyModule parent)
Define a new module with the given name under the given module or
class namespace.
|
void |
defineReadonlyVariable(java.lang.String name,
IRubyObject value,
GlobalVariable.Scope scope)
defines a readonly global variable
|
void |
defineVariable(GlobalVariable variable,
GlobalVariable.Scope scope)
Defines a global variable
|
void |
eachModule(Function1<java.lang.Object,IRubyObject> func) |
IRubyObject |
evalScriptlet(java.lang.String script)
Evaluates a script under the current scope (perhaps the top-level
scope) and returns the result (generally the last value calculated).
|
IRubyObject |
evalScriptlet(java.lang.String script,
DynamicScope scope)
Evaluates a script under the current scope (perhaps the top-level
scope) and returns the result (generally the last value calculated).
|
IRubyObject |
execRecursive(Ruby.RecursiveFunction func,
IRubyObject obj)
Perform a recursive walk on the given object using the given function.
|
private IRubyObject |
execRecursiveI(Ruby.ExecRecursiveParams p) |
private IRubyObject |
execRecursiveInternal(Ruby.RecursiveFunction func,
IRubyObject obj,
IRubyObject pairid,
boolean outer) |
IRubyObject |
execRecursiveOuter(Ruby.RecursiveFunction func,
IRubyObject obj)
Perform a recursive walk on the given object using the given function.
|
IRubyObject |
executeScript(java.lang.String script,
java.lang.String filename)
Parse and execute the specified script
This differs from the other methods in that it accepts a string-based script and
parses and runs it as though it were loaded at a command-line.
|
private void |
failForcedCompile(Node scriptNode) |
RubyClass |
fastGetClass(java.lang.String internedName)
Deprecated.
|
RubyModule |
fastGetModule(java.lang.String internedName)
Deprecated.
|
RubySymbol |
fastNewSymbol(java.lang.String internedName)
Faster than
newSymbol(String) if you already have an interned
name String. |
IRubyObject |
fetchGlobalConstant(java.lang.String name)
Fetch a constant from the global namespace (i.e.
|
IRubyObject |
getArgsFile() |
RubyClass |
getArgumentError() |
RubyClass |
getArray() |
int |
getBacktraceCount()
Get the current backtrace count.
|
RubyClass |
getBasicObject() |
BeanManager |
getBeanManager() |
RubyClass |
getBignum() |
RubyClass |
getBinding() |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getBoundMethods() |
int |
getCallerCount()
Get the current backtrace count.
|
RubyHash |
getCharsetMap() |
Invalidator |
getCheckpointInvalidator() |
RubyClass |
getClass(java.lang.String name)
Retrieve the class with the given name from the Object namespace.
|
RubyClass |
getClassClass() |
RubyModule |
getClassFromPath(java.lang.String path) |
static java.lang.ClassLoader |
getClassLoader() |
RubyModule |
getComparable() |
RubyClass |
getComplex() |
RubyClass |
getConcurrencyError() |
int |
getConstantGeneration()
Deprecated.
|
Invalidator |
getConstantInvalidator(java.lang.String constantName) |
RubyClass |
getContinuation() |
RubyClass |
getConverter() |
RubyClass |
getConverterNotFoundError() |
CoverageData |
getCoverageData() |
ThreadContext |
getCurrentContext() |
java.lang.String |
getCurrentDirectory() |
static Ruby |
getCurrentInstance()
Deprecated.
|
int |
getCurrentLine() |
IRubyObject |
getDebug()
Getter for property isDebug.
|
org.jcodings.Encoding |
getDefaultExternalEncoding() |
static Ruby |
getDefaultInstance()
Deprecated.
use #newInstance()
|
org.jcodings.Encoding |
getDefaultInternalEncoding()
This is an internal encoding if actually specified via default_internal=
or passed in via -E.
|
DynamicMethod |
getDefaultMethodMissing() |
RubyRandom.RandomType |
getDefaultRand() |
RubyThreadGroup |
getDefaultThreadGroup() |
RubyString |
getDefinedMessage(DefinedMessage definedMessage) |
ChannelDescriptor |
getDescriptorByFileno(int aFileno)
Deprecated.
|
RubyClass |
getDir() |
RubyClass |
getDummy() |
RubyArray |
getEmptyFrozenArray() |
RubyClass |
getEncoding() |
RubyClass |
getEncodingCompatibilityError() |
RubyClass |
getEncodingError() |
EncodingService |
getEncodingService() |
RubyModule |
getEnumerable() |
RubyClass |
getEnumerator() |
RubyHash |
getENV() |
RubyClass |
getEOFError() |
java.io.PrintStream |
getErr() |
RubyModule |
getErrno() |
RubyClass |
getErrno(int n) |
java.io.PrintStream |
getErrorStream() |
RubyModule |
getEtc() |
RubyClass |
getException() |
int |
getExceptionCount()
Get the current exception count.
|
java.util.concurrent.ExecutorService |
getExecutor() |
RubyBoolean |
getFalse()
Returns the "false" instance from the instance pool.
|
RubyClass |
getFalseClass() |
RubyClass |
getFatal() |
FFI |
getFFI() |
RubyClass |
getFiberError() |
java.util.concurrent.ExecutorService |
getFiberExecutor() |
RubyClass |
getFile() |
int |
getFileno(ChannelDescriptor descriptor)
Get the "external" fileno for a given ChannelDescriptor.
|
int |
getFilenoExtMap(int external) |
int |
getFilenoIntMap(int internal) |
int |
getFilenoIntMapSize() |
RubyClass |
getFileStat() |
RubyModule |
getFileTest() |
RubyClass |
getFixnum() |
Invalidator |
getFixnumInvalidator()
Retrieve the invalidator for Fixnum reopening
|
RubyClass |
getFloat() |
RubyClass |
getFloatDomainError() |
Invalidator |
getFloatInvalidator()
Retrieve the invalidator for Float reopening
|
RubyModule |
getGC() |
static Ruby |
getGlobalRuntime()
Get the global runtime.
|
long |
getGlobalState()
GET_VM_STATE_VERSION
|
GlobalVariables |
getGlobalVariables() |
IRubyObject |
getGroupStruct() |
RubyClass |
getHash() |
long |
getHashSeedK0() |
long |
getHashSeedK1() |
java.lang.Object |
getHierarchyLock()
Get the global object used to synchronize class-hierarchy modifications like
cache invalidation, subclass sets, and included hierarchy sets.
|
java.io.InputStream |
getIn() |
RubyClass |
getIndexError() |
java.io.InputStream |
getInputStream() |
RubyInstanceConfig |
getInstanceConfig() |
RubyClass |
getInteger() |
RubyClass |
getInterrupt() |
RubyClass |
getInterruptedRegexpError() |
RubyClass |
getInvalidByteSequenceError() |
RubyClass |
getIO() |
RubyClass |
getIOError() |
IRManager |
getIRManager() |
JavaProxyClassFactory |
getJavaProxyClassFactory() |
JavaSupport |
getJavaSupport() |
JITCompiler |
getJITCompiler() |
java.util.Set<Script> |
getJittedMethods() |
JRubyClassLoader |
getJRubyClassLoader()
TODO the property
jrubyClassLoader will only be set in constructor. |
java.lang.String |
getJRubyHome() |
KCode |
getKCode() |
RubyModule |
getKernel() |
RubyClass |
getKeyError() |
RubyClass |
getLoadError() |
LoadService |
getLoadService()
Returns the loadService.
|
RubyClass |
getLocalJumpError() |
RubyClass |
getLocation() |
RubyModule |
getMarshal() |
RubyClass |
getMatchData() |
RubyModule |
getMath() |
RubyClass |
getMathDomainError() |
RubyClass |
getMethod() |
RubyClass |
getModule() |
RubyModule |
getModule(java.lang.String name)
Retrieve the module with the given name from the Object namespace.
|
RubyClass |
getNameError() |
RubyClass |
getNameErrorMessage() |
RubyClass |
getNativeException() |
long |
getNextDynamicMethodSerial()
Get a new serial number for a new DynamicMethod instance
|
int |
getNextModuleGeneration()
Get a new generation number for a module or class.
|
IRubyObject |
getNil()
Returns the "nil" singleton instance.
|
RubyClass |
getNilClass() |
IRubyObject[] |
getNilPrefilledArray() |
RubyClass |
getNoMemoryError() |
RubyClass |
getNoMethodError() |
DynamicMethod |
getNormalMethodMissing() |
RubyClass |
getNotImplementedError() |
RubyClass |
getNumeric() |
RubyClass |
getObject() |
ObjectSpace |
getObjectSpace() |
RubyModule |
getObjectSpaceModule() |
RubyModule |
getOrCreateModule(java.lang.String name)
From Object, retrieve the named module.
|
java.io.PrintStream |
getOut() |
java.io.PrintStream |
getOutputStream() |
Parser |
getParser() |
IRubyObject |
getPasswdStruct() |
jnr.posix.POSIX |
getPosix() |
RubyModule |
getPrecision() |
DynamicMethod |
getPrivateMethodMissing() |
RubyClass |
getProc() |
RubyModule |
getProcess() |
RubyModule |
getProcGID() |
RubyClass |
getProcStatus() |
RubyModule |
getProcSysModule() |
RubyModule |
getProcUID() |
Profile |
getProfile() |
ProfiledMethods |
getProfiledMethods()
Deprecated.
This should be an implementation detail of the ProfilingService and should remove from the Ruby class.
|
ProfilingService |
getProfilingService() |
private ProfilingServiceLookup |
getProfilingServiceLookup()
Simple getter for #profilingServiceLookup to avoid direct property access
|
DynamicMethod |
getProtectedMethodMissing() |
java.util.Random |
getRandom() |
RubyClass |
getRandomClass() |
RubyClass |
getRange() |
RubyClass |
getRangeError() |
RubyClass |
getRational() |
GlobalVariable |
getRecordSeparatorVar() |
RubyClass |
getRegexp() |
RubyClass |
getRegexpError() |
DynamicMethod |
getRespondToMethod() |
DynamicMethod |
getRespondToMissingMethod() |
IRubyObject |
getRootFiber() |
RuntimeCache |
getRuntimeCache()
Get the core class RuntimeCache instance, for doing dynamic calls from
core class methods.
|
RubyClass |
getRuntimeError() |
int |
getRuntimeNumber() |
int |
getSafeLevel()
Deprecated.
|
RubyClass |
getSecurityError() |
SelectorPool |
getSelectorPool()
Get the runtime-global selector pool
|
RubyClass |
getSignalException() |
IRubyObject[] |
getSingleNilArray() |
RubyClass |
getStandardError() |
long |
getStartTime() |
StaticScopeFactory |
getStaticScopeFactory() |
RubyClass |
getStopIteration() |
RubyClass |
getString() |
RubyClass |
getStructClass() |
DynamicMethod |
getSuperMethodMissing() |
RubyClass |
getSymbol() |
RubySymbol.SymbolTable |
getSymbolTable() |
RubyClass |
getSyntaxError() |
RubyClass |
getSystemCallError() |
RubyClass |
getSystemExit() |
RubyClass |
getSystemStackError() |
RubyClass |
getThread() |
RubyClass |
getThreadError() |
RubyClass |
getThreadGroup() |
static Ruby |
getThreadLocalRuntime()
Get the thread-local runtime for the current thread, or null if unset.
|
ThreadService |
getThreadService() |
RubyString |
getThreadStatus(RubyThread.Status status) |
RubyClass |
getTime() |
java.util.Map<java.lang.String,org.joda.time.DateTimeZone> |
getTimezoneCache() |
IRubyObject |
getTmsStruct() |
IRubyObject |
getTopSelf()
Getter for property rubyTopSelf.
|
RubyBoolean |
getTrue()
Returns the "true" instance from the instance pool.
|
RubyClass |
getTrueClass() |
RubyClass |
getTypeError() |
RubyClass |
getUnboundMethod() |
RubyClass |
getUndefinedConversionError() |
DynamicMethod |
getVariableMethodMissing() |
IRubyObject |
getVerbose()
Getter for property isVerbose.
|
int |
getWarningCount()
Get the current backtrace count.
|
RubyWarnings |
getWarnings() |
RubyClass |
getYielder() |
RubyClass |
getZeroDivisionError() |
private void |
handeCompileError(Node node,
java.lang.Throwable t) |
boolean |
hasEventHooks() |
void |
incGlobalState()
INC_VM_STATE_VERSION
|
void |
incrementBacktraceCount()
Increment the count of backtraces generated by code in this runtime.
|
void |
incrementCallerCount()
Increment the count of backtraces generated by code in this runtime.
|
void |
incrementExceptionCount()
Increment the count of exceptions generated by code in this runtime.
|
void |
incrementWarningCount()
Increment the count of backtraces generated for warnings in this runtime.
|
private void |
init()
This method is called immediately after constructing the Ruby instance.
|
private void |
initBuiltins() |
private void |
initCore() |
private void |
initDefinedMessages() |
private void |
initErrno()
Create module Errno's Variables.
|
private void |
initExceptions() |
private void |
initRoot() |
private void |
initRubyKernel() |
private void |
initThreadStatuses() |
boolean |
is1_8() |
boolean |
is1_9() |
boolean |
is2_0() |
boolean |
isBooting() |
boolean |
isClassDefined(java.lang.String name) |
boolean |
isDebug() |
boolean |
isDoNotReverseLookupEnabled() |
boolean |
isFixnumReopened()
Whether the Float class has been reopened and modified
|
boolean |
isFloatReopened()
Whether the Float class has been reopened and modified
|
boolean |
isGlobalAbortOnExceptionEnabled() |
static boolean |
isGlobalRuntimeReady()
Tests whether globalRuntime has been instantiated or not.
|
boolean |
isInspecting(java.lang.Object obj) |
boolean |
isObjectSpaceEnabled() |
static boolean |
isSecurityRestricted() |
boolean |
isSiphashEnabled() |
boolean |
isVerbose() |
<E extends java.lang.Enum<E>> |
loadConstantSet(RubyModule module,
java.lang.Class<E> enumClass) |
void |
loadConstantSet(RubyModule module,
java.lang.String constantSetName) |
void |
loadExtension(java.lang.String extName,
BasicLibraryService extension,
boolean wrap)
Load the given BasicLibraryService instance, wrapping it in Ruby framing
to ensure it is isolated from any parent scope.
|
void |
loadFile(java.lang.String scriptName,
java.io.InputStream in,
boolean wrap) |
void |
loadScript(Script script) |
void |
loadScript(Script script,
boolean wrap) |
RaiseException |
newArgumentError(int got,
int expected) |
RaiseException |
newArgumentError(java.lang.String message) |
RaiseException |
newArgumentError(java.lang.String name,
int got,
int expected) |
RubyArray |
newArray() |
RubyArray |
newArray(int size) |
RubyArray |
newArray(IRubyObject... objects) |
RubyArray |
newArray(IRubyObject object) |
RubyArray |
newArray(IRubyObject car,
IRubyObject cdr) |
RubyArray |
newArray(java.util.List<IRubyObject> list) |
RubyArray |
newArrayLight() |
RubyArray |
newArrayNoCopy(IRubyObject... objects) |
RubyArray |
newArrayNoCopyLight(IRubyObject... objects) |
RubyBinding |
newBinding() |
RubyBinding |
newBinding(Binding binding) |
RubyProc |
newBlockPassProc(Block.Type type,
Block block) |
RubyBoolean |
newBoolean(boolean value) |
RaiseException |
newConcurrencyError(java.lang.String message) |
RaiseException |
newConverterNotFoundError(java.lang.String message) |
RubyObject.Data |
newData(RubyClass objectClass,
java.lang.Object sval) |
RubyArray |
newEmptyArray() |
RaiseException |
newEncodingCompatibilityError(java.lang.String message) |
RaiseException |
newEncodingError(java.lang.String message) |
RaiseException |
newEOFError() |
RaiseException |
newEOFError(java.lang.String message) |
RaiseException |
newErrnoEACCESError(java.lang.String message) |
RaiseException |
newErrnoEADDRFromBindException(java.net.BindException be) |
RaiseException |
newErrnoEADDRFromBindException(java.net.BindException be,
java.lang.String contextMessage) |
RaiseException |
newErrnoEADDRINUSEError() |
RaiseException |
newErrnoEADDRINUSEError(java.lang.String message) |
RaiseException |
newErrnoEADDRNOTAVAILError(java.lang.String message) |
RaiseException |
newErrnoEAGAINError(java.lang.String message) |
RaiseException |
newErrnoEAGAINReadableError(java.lang.String message) |
RaiseException |
newErrnoEAGAINWritableError(java.lang.String message) |
RaiseException |
newErrnoEBADFError() |
RaiseException |
newErrnoEBADFError(java.lang.String message) |
RaiseException |
newErrnoECHILDError() |
RaiseException |
newErrnoECONNABORTEDError() |
RaiseException |
newErrnoECONNREFUSEDError() |
RaiseException |
newErrnoECONNRESETError() |
RaiseException |
newErrnoEDESTADDRREQError(java.lang.String func) |
RaiseException |
newErrnoEDOMError(java.lang.String message) |
RaiseException |
newErrnoEEXISTError(java.lang.String message) |
RaiseException |
newErrnoEHOSTUNREACHError(java.lang.String message) |
RaiseException |
newErrnoEINPROGRESSError() |
RaiseException |
newErrnoEINPROGRESSError(java.lang.String message) |
RaiseException |
newErrnoEINPROGRESSWritableError() |
RaiseException |
newErrnoEINPROGRESSWritableError(java.lang.String message) |
RaiseException |
newErrnoEINVALError() |
RaiseException |
newErrnoEINVALError(java.lang.String message) |
RaiseException |
newErrnoEISCONNError() |
RaiseException |
newErrnoEISCONNError(java.lang.String message) |
RaiseException |
newErrnoEISDirError() |
RaiseException |
newErrnoEISDirError(java.lang.String message) |
RaiseException |
newErrnoENOENTError() |
RaiseException |
newErrnoENOENTError(java.lang.String message) |
RaiseException |
newErrnoENOPROTOOPTError() |
RaiseException |
newErrnoENOTCONNError() |
RaiseException |
newErrnoENOTCONNError(java.lang.String message) |
RaiseException |
newErrnoENOTDIRError(java.lang.String message) |
RaiseException |
newErrnoENOTEMPTYError(java.lang.String message) |
RaiseException |
newErrnoENOTSOCKError(java.lang.String message) |
RaiseException |
newErrnoEPERMError(java.lang.String name) |
RaiseException |
newErrnoEPIPEError() |
RaiseException |
newErrnoESPIPEError() |
RaiseException |
newErrnoESPIPEError(java.lang.String message) |
RaiseException |
newErrnoESRCHError() |
RaiseException |
newErrnoEWOULDBLOCKError() |
RaiseException |
newErrnoFromInt(int errno) |
RaiseException |
newErrnoFromInt(int errno,
java.lang.String message) |
RaiseException |
newErrnoFromInt(int errno,
java.lang.String methodName,
java.lang.String message) |
RaiseException |
newErrnoFromLastPOSIXErrno() |
RaiseException |
newFiberError(java.lang.String message) |
RubyFileStat |
newFileStat(java.io.FileDescriptor descriptor) |
RubyFileStat |
newFileStat(java.lang.String filename,
boolean lstat) |
RubyFixnum |
newFixnum(jnr.constants.Constant value) |
RubyFixnum |
newFixnum(int value) |
RubyFixnum |
newFixnum(long value) |
RubyFloat |
newFloat(double value) |
RaiseException |
newFloatDomainError(java.lang.String message) |
RaiseException |
newFrozenError(java.lang.String objectType) |
RaiseException |
newFrozenError(java.lang.String objectType,
boolean runtimeError) |
RaiseException |
newIllegalSequence(java.lang.String message) |
RaiseException |
newIndexError(java.lang.String message) |
static Ruby |
newInstance()
Returns a new instance of the JRuby runtime configured with defaults.
|
static Ruby |
newInstance(java.io.InputStream in,
java.io.PrintStream out,
java.io.PrintStream err)
Returns a new instance of the JRuby runtime configured with the given
input, output and error streams and otherwise default configuration
(except where specified system properties alter defaults).
|
static Ruby |
newInstance(RubyInstanceConfig config)
Returns a new instance of the JRuby runtime configured as specified.
|
RaiseException |
newInterruptedRegexpError(java.lang.String message) |
RaiseException |
newInvalidByteSequenceError(java.lang.String message) |
RaiseException |
newInvalidEncoding(java.lang.String message) |
RaiseException |
newIOError(java.lang.String message) |
RaiseException |
newIOErrorFromException(java.io.IOException ioe) |
RaiseException |
newKeyError(java.lang.String message) |
private RaiseException |
newLightweightErrnoException(RubyClass exceptionClass,
java.lang.String message)
Generate one of the ERRNO exceptions.
|
RaiseException |
newLightweightStopIterationError(java.lang.String message)
Generate a StopIteration exception.
|
RaiseException |
newLoadError(java.lang.String message) |
RaiseException |
newLoadError(java.lang.String message,
java.lang.String path) |
RaiseException |
newLocalJumpError(RubyLocalJumpError.Reason reason,
IRubyObject exitValue,
java.lang.String message) |
RaiseException |
newLocalJumpErrorNoBlock() |
RaiseException |
newMathDomainError(java.lang.String message) |
RaiseException |
newNameError(java.lang.String message,
java.lang.String name) |
RaiseException |
newNameError(java.lang.String message,
java.lang.String name,
java.lang.Throwable origException) |
RaiseException |
newNameError(java.lang.String message,
java.lang.String name,
java.lang.Throwable origException,
boolean printWhenVerbose) |
RaiseException |
newNameErrorObject(java.lang.String message,
IRubyObject name) |
RaiseException |
newNoMethodError(java.lang.String message,
java.lang.String name,
IRubyObject args) |
RaiseException |
newNotImplementedError(java.lang.String message) |
RubyNumeric |
newNumeric() |
RubyProc |
newProc(Block.Type type,
Block block) |
RaiseException |
newRaiseException(RubyClass exceptionClass,
java.lang.String message) |
RaiseException |
newRangeError(java.lang.String message) |
RubyRational |
newRational(long num,
long den) |
RubyRational |
newRationalReduced(long num,
long den) |
RaiseException |
newRedoLocalJumpError() |
RaiseException |
newRegexpError(java.lang.String message) |
RaiseException |
newRuntimeError(java.lang.String message) |
RaiseException |
newSecurityError(java.lang.String message) |
RaiseException |
newStandardError(java.lang.String message) |
RubyString |
newString() |
RubyString |
newString(org.jruby.util.ByteList byteList) |
RubyString |
newString(java.lang.String string) |
RubyString |
newStringShared(org.jruby.util.ByteList byteList)
Deprecated.
|
RubySymbol |
newSymbol(org.jruby.util.ByteList name) |
RubySymbol |
newSymbol(java.lang.String name) |
RaiseException |
newSyntaxError(java.lang.String message) |
RaiseException |
newSystemCallError(java.lang.String message) |
RaiseException |
newSystemExit(int status) |
RaiseException |
newSystemExit(int status,
java.lang.String message) |
RaiseException |
newSystemStackError(java.lang.String message) |
RaiseException |
newSystemStackError(java.lang.String message,
java.lang.StackOverflowError soe) |
RaiseException |
newThreadError(java.lang.String message) |
RubyTime |
newTime(long milliseconds) |
RaiseException |
newTypeError(IRubyObject receivedObject,
RubyClass expectedType) |
RaiseException |
newTypeError(IRubyObject receivedObject,
RubyModule expectedType) |
RaiseException |
newTypeError(IRubyObject receivedObject,
java.lang.String expectedType) |
RaiseException |
newTypeError(java.lang.String message) |
RaiseException |
newUndefinedConversionError(java.lang.String message) |
RaiseException |
newZeroDivisionError() |
Node |
parse(org.jruby.util.ByteList content,
java.lang.String file,
DynamicScope scope,
int lineNumber,
boolean extraPositionInformation) |
Node |
parse(java.lang.String content,
java.lang.String file,
DynamicScope scope,
int lineNumber,
boolean extraPositionInformation)
Deprecated.
|
Node |
parseEval(org.jruby.util.ByteList content,
java.lang.String file,
DynamicScope scope,
int lineNumber) |
Node |
parseEval(java.lang.String content,
java.lang.String file,
DynamicScope scope,
int lineNumber) |
Node |
parseFile(java.io.InputStream in,
java.lang.String file,
DynamicScope scope) |
Node |
parseFile(java.io.InputStream in,
java.lang.String file,
DynamicScope scope,
int lineNumber) |
Node |
parseFileFromMain(java.io.InputStream in,
java.lang.String file,
DynamicScope scope) |
Node |
parseFromMain(java.io.InputStream inputStream,
java.lang.String filename)
Parse the script contained in the given input stream, using the given
filename as the name of the script, and return the root Node.
|
Node |
parseInline(java.io.InputStream in,
java.lang.String file,
DynamicScope scope) |
void |
printError(RubyException excp)
Prints an error with backtrace to the error stream.
|
void |
printProfileData(ProfileCollection profileData)
TDOD remove the synchronized.
|
IRubyObject |
pushExitBlock(RubyProc proc)
Push block onto exit stack.
|
void |
putFilenoMap(int external,
int internal) |
private boolean |
recursiveCheck(IRubyObject list,
IRubyObject obj_id,
IRubyObject paired_obj_id) |
private IRubyObject |
recursiveListAccess() |
private void |
recursiveListClear() |
<T extends IRubyObject> |
recursiveListOperation(java.util.concurrent.Callable<T> body)
Begin a recursive walk that may make one or more calls to
execRecursive. |
private void |
recursivePop(IRubyObject list,
IRubyObject obj,
IRubyObject paired_obj) |
private void |
recursivePush(IRubyObject list,
IRubyObject obj,
IRubyObject paired_obj) |
void |
registerDescriptor(ChannelDescriptor descriptor)
Deprecated.
|
void |
registerDescriptor(ChannelDescriptor descriptor,
boolean isRetained)
Deprecated.
|
void |
registerInspecting(java.lang.Object obj) |
void |
registerMBeans() |
(package private) void |
reinitialize(boolean reinitCore) |
void |
releaseClassLoader()
By default
tearDown(boolean) does not release the class-loader's
resources as threads might be still running accessing the classes/packages
even after the runtime has been torn down. |
void |
removeEventHook(EventHook hook) |
void |
removeFilenoIntMap(int internal) |
void |
removeFinalizer(Finalizable finalizer) |
void |
removeInternalFinalizer(Finalizable finalizer) |
void |
reopenFixnum()
Mark Fixnum as reopened
|
void |
reopenFloat()
Mark Float as reopened
|
void |
runFromMain(java.io.InputStream inputStream,
java.lang.String filename)
Run the script contained in the specified input stream, using the
specified filename as the name of the script being executed.
|
IRubyObject |
runInterpreter(Node scriptNode) |
IRubyObject |
runInterpreter(ThreadContext context,
Node rootNode,
IRubyObject self) |
IRubyObject |
runInterpreterBody(Node scriptNode)
This is used for the "gets" loop, and we bypass 'load' to use an
already-prepared, already-pushed scope for the script body.
|
IRubyObject |
runNormally(Node scriptNode)
Run the specified script without any of the loop-processing wrapper
code.
|
IRubyObject |
runNormally(Node scriptNode,
boolean unused)
Deprecated.
|
IRubyObject |
runScript(Script script) |
IRubyObject |
runScript(Script script,
boolean wrap) |
IRubyObject |
runScriptBody(Script script)
This is used for the "gets" loop, and we bypass 'load' to use an
already-prepared, already-pushed scope for the script body.
|
IRubyObject |
runWithGetsLoop(Node scriptNode,
boolean printing,
boolean processLineEnds,
boolean split)
Run the given script with a "while gets; end" loop wrapped around it.
|
IRubyObject |
runWithGetsLoop(Node scriptNode,
boolean printing,
boolean processLineEnds,
boolean split,
boolean unused)
Deprecated.
|
void |
secure(int level)
Deprecated.
|
void |
setArgsFile(IRubyObject argsFile) |
(package private) void |
setArray(RubyClass arrayClass) |
(package private) void |
setBignum(RubyClass bignumClass) |
(package private) void |
setBinding(RubyClass bindingClass) |
(package private) void |
setComparable(RubyModule comparableModule) |
(package private) void |
setComplex(RubyClass complexClass) |
(package private) void |
setContinuation(RubyClass continuationClass) |
(package private) void |
setConverter(RubyClass converterClass) |
void |
setCurrentDirectory(java.lang.String dir) |
static void |
setCurrentInstance(Ruby runtime)
Deprecated.
|
void |
setCurrentLine(int line) |
void |
setDebug(IRubyObject debug)
Setter for property isDebug.
|
void |
setDefaultExternalEncoding(org.jcodings.Encoding defaultExternalEncoding) |
void |
setDefaultInternalEncoding(org.jcodings.Encoding defaultInternalEncoding) |
void |
setDefaultMethodMissing(DynamicMethod method) |
void |
setDefaultRand(RubyRandom.RandomType defaultRand) |
(package private) void |
setDefaultThreadGroup(RubyThreadGroup defaultThreadGroup) |
(package private) void |
setDir(RubyClass dirClass) |
void |
setDoNotReverseLookupEnabled(boolean b) |
(package private) void |
setEncoding(RubyClass encodingClass) |
(package private) void |
setEnumerable(RubyModule enumerableModule) |
(package private) void |
setEnumerator(RubyClass enumeratorClass) |
void |
setENV(RubyHash env) |
void |
setEtc(RubyModule etcModule) |
(package private) void |
setException(RubyClass exceptionClass) |
(package private) void |
setFalseClass(RubyClass falseClass) |
void |
setFFI(FFI ffi) |
(package private) void |
setFile(RubyClass fileClass) |
(package private) void |
setFileStat(RubyClass fileStatClass) |
(package private) void |
setFileTest(RubyModule fileTestModule) |
(package private) void |
setFixnum(RubyClass fixnumClass) |
(package private) void |
setFloat(RubyClass floatClass) |
(package private) void |
setGC(RubyModule gcModule) |
void |
setGlobalAbortOnExceptionEnabled(boolean enable) |
private static void |
setGlobalRuntimeFirstTimeOnly(Ruby runtime)
Set the global runtime to the given runtime only if it has no been set.
|
void |
setGlobalVariables(GlobalVariables globalVariables) |
void |
setGroupStruct(RubyClass groupStruct) |
(package private) void |
setHash(RubyClass hashClass) |
(package private) void |
setInteger(RubyClass integerClass) |
(package private) void |
setIO(RubyClass ioClass) |
void |
setJavaProxyClassFactory(JavaProxyClassFactory factory) |
void |
setJRubyHome(java.lang.String home) |
void |
setKCode(KCode kcode) |
(package private) void |
setKernel(RubyModule kernelModule) |
void |
setLocation(RubyClass location) |
(package private) void |
setMarshal(RubyModule marshalModule) |
(package private) void |
setMatchData(RubyClass matchDataClass) |
(package private) void |
setMath(RubyModule mathModule) |
(package private) void |
setMethod(RubyClass methodClass) |
private void |
setNetworkStack() |
(package private) void |
setNilClass(RubyClass nilClass) |
void |
setNormalMethodMissing(DynamicMethod method) |
(package private) void |
setNumeric(RubyClass numericClass) |
void |
setObjectSpaceEnabled(boolean objectSpaceEnabled) |
(package private) void |
setObjectSpaceModule(RubyModule objectSpaceModule) |
void |
setPasswdStruct(RubyClass passwdStruct) |
(package private) void |
setPrecision(RubyModule precisionModule) |
void |
setPrivateMethodMissing(DynamicMethod method) |
(package private) void |
setProc(RubyClass procClass) |
(package private) void |
setProcess(RubyModule processModule) |
(package private) void |
setProcGID(RubyModule procGIDModule) |
(package private) void |
setProcStatus(RubyClass procStatusClass) |
(package private) void |
setProcSys(RubyModule procSysModule) |
(package private) void |
setProcUID(RubyModule procUIDModule) |
void |
setProtectedMethodMissing(DynamicMethod method) |
(package private) void |
setRandomClass(RubyClass randomClass) |
(package private) void |
setRange(RubyClass rangeClass) |
(package private) void |
setRational(RubyClass rationalClass) |
void |
setRecordSeparatorVar(GlobalVariable recordSeparatorVar) |
(package private) void |
setRegexp(RubyClass regexpClass) |
void |
setRespondToMethod(DynamicMethod rtm) |
void |
setRespondToMissingMethod(DynamicMethod rtmm) |
void |
setRootFiber(IRubyObject fiber) |
void |
setSafeLevel(int safeLevel)
Deprecated.
|
static void |
setSecurityRestricted(boolean restricted) |
(package private) void |
setString(RubyClass stringClass) |
(package private) void |
setStructClass(RubyClass structClass) |
void |
setSuperMethodMissing(DynamicMethod method) |
(package private) void |
setSymbol(RubyClass symbolClass) |
(package private) void |
setThread(RubyClass threadClass) |
(package private) void |
setThreadGroup(RubyClass threadGroupClass) |
static void |
setThreadLocalRuntime(Ruby ruby)
Set the thread-local runtime to the given runtime.
|
(package private) void |
setTime(RubyClass timeClass) |
(package private) void |
setTmsStruct(RubyClass tmsStruct) |
void |
setTraceFunction(RubyProc traceFunction) |
(package private) void |
setTrueClass(RubyClass trueClass) |
(package private) void |
setUnboundMethod(RubyClass unboundMethodClass) |
private void |
setupSourceEncoding(ParserConfiguration parserConfig) |
void |
setVariableMethodMissing(DynamicMethod method) |
void |
setVerbose(IRubyObject verbose)
Setter for property isVerbose.
|
(package private) void |
setYielder(RubyClass yielderClass) |
void |
tearDown()
Make sure Kernel#at_exit procs getService invoked on runtime shutdown.
|
void |
tearDown(boolean systemExit) |
Script |
tryCompile(Node node)
Try to compile the code associated with the given Node, returning an
instance of the successfully-compiled Script or null if the script could
not be compiled.
|
Script |
tryCompile(Node node,
ASTInspector inspector)
Try to compile the code associated with the given Node, returning an
instance of the successfully-compiled Script or null if the script could
not be compiled.
|
private Script |
tryCompile(Node node,
java.lang.String cachedClassName,
JRubyClassLoader classLoader,
ASTInspector inspector,
boolean dump) |
private Script |
tryCompile(Node node,
java.lang.String cachedClassName,
JRubyClassLoader classLoader,
boolean dump) |
void |
unregisterDescriptor(int aFileno)
Deprecated.
|
void |
unregisterInspecting(java.lang.Object obj) |
void |
useAsGlobalRuntime()
Convenience method for java integrators who may need to switch the notion
of "global" runtime.
|
boolean |
warningsEnabled() |
private static final Logger LOG
public static final int NIL_PREFILLED_ARRAY_SIZE
private final IRubyObject[] nilPrefilledArray
private java.util.Map<java.lang.Integer,RubyClass> errnos
private RubyRandom.RandomType defaultRand
private RubyHash charsetMap
private static final java.util.EnumSet<RubyEvent> EVENTS2_0
private final Ruby.CallTraceFuncHook callTraceFuncHook
private static final java.util.regex.Pattern ADDR_NOT_AVAIL_PATTERN
private final java.util.Map<java.lang.Integer,java.lang.Integer> filenoExtIntMap
private final java.util.Map<java.lang.Integer,java.lang.Integer> filenoIntExtMap
private java.lang.ThreadLocal<java.util.Map<java.lang.Object,java.lang.Object>> inspect
private final java.util.concurrent.ConcurrentHashMap<java.lang.String,Invalidator> constantNameInvalidators
private final Invalidator checkpointInvalidator
private final ThreadService threadService
private jnr.posix.POSIX posix
private final ObjectSpace objectSpace
private final RubySymbol.SymbolTable symbolTable
private static final EventHook[] EMPTY_HOOKS
private volatile EventHook[] eventHooks
private boolean hasEventHooks
private boolean globalAbortOnExceptionEnabled
private boolean doNotReverseLookupEnabled
private volatile boolean objectSpaceEnabled
private boolean siphashEnabled
private final java.util.Set<Script> jittedMethods
private long globalState
private IRubyObject topSelf
private IRubyObject rootFiber
private RubyNil nilObject
private IRubyObject[] singleNilArray
private RubyBoolean trueObject
private RubyBoolean falseObject
public final RubyFixnum[] fixnumCache
private boolean verbose
private boolean warningsEnabled
private boolean debug
private IRubyObject verboseValue
private RubyThreadGroup defaultThreadGroup
private RubyClass basicObjectClass
private RubyClass objectClass
private RubyClass moduleClass
private RubyClass classClass
private RubyClass nilClass
private RubyClass trueClass
private RubyClass falseClass
private RubyClass numericClass
private RubyClass floatClass
private RubyClass integerClass
private RubyClass fixnumClass
private RubyClass complexClass
private RubyClass rationalClass
private RubyClass enumeratorClass
private RubyClass yielderClass
private RubyClass arrayClass
private RubyClass hashClass
private RubyClass rangeClass
private RubyClass stringClass
private RubyClass encodingClass
private RubyClass converterClass
private RubyClass symbolClass
private RubyClass procClass
private RubyClass bindingClass
private RubyClass methodClass
private RubyClass unboundMethodClass
private RubyClass matchDataClass
private RubyClass regexpClass
private RubyClass timeClass
private RubyClass bignumClass
private RubyClass dirClass
private RubyClass fileClass
private RubyClass fileStatClass
private RubyClass ioClass
private RubyClass threadClass
private RubyClass threadGroupClass
private RubyClass continuationClass
private RubyClass structClass
private RubyClass tmsStruct
private RubyClass passwdStruct
private RubyClass groupStruct
private RubyClass procStatusClass
private RubyClass exceptionClass
private RubyClass runtimeError
private RubyClass ioError
private RubyClass scriptError
private RubyClass nameError
private RubyClass nameErrorMessage
private RubyClass noMethodError
private RubyClass signalException
private RubyClass rangeError
private RubyClass dummyClass
private RubyClass systemExit
private RubyClass localJumpError
private RubyClass nativeException
private RubyClass systemCallError
private RubyClass fatal
private RubyClass interrupt
private RubyClass typeError
private RubyClass argumentError
private RubyClass indexError
private RubyClass stopIteration
private RubyClass syntaxError
private RubyClass standardError
private RubyClass loadError
private RubyClass notImplementedError
private RubyClass securityError
private RubyClass noMemoryError
private RubyClass regexpError
private RubyClass eofError
private RubyClass threadError
private RubyClass concurrencyError
private RubyClass systemStackError
private RubyClass zeroDivisionError
private RubyClass floatDomainError
private RubyClass mathDomainError
private RubyClass encodingError
private RubyClass encodingCompatibilityError
private RubyClass converterNotFoundError
private RubyClass undefinedConversionError
private RubyClass invalidByteSequenceError
private RubyClass fiberError
private RubyClass randomClass
private RubyClass keyError
private RubyClass locationClass
private RubyClass interruptedRegexpError
private RubyModule kernelModule
private RubyModule comparableModule
private RubyModule enumerableModule
private RubyModule mathModule
private RubyModule marshalModule
private RubyModule etcModule
private RubyModule fileTestModule
private RubyModule gcModule
private RubyModule objectSpaceModule
private RubyModule processModule
private RubyModule procUIDModule
private RubyModule procGIDModule
private RubyModule procSysModule
private RubyModule precisionModule
private RubyModule errnoModule
private DynamicMethod privateMethodMissing
private DynamicMethod protectedMethodMissing
private DynamicMethod variableMethodMissing
private DynamicMethod superMethodMissing
private DynamicMethod normalMethodMissing
private DynamicMethod defaultMethodMissing
private DynamicMethod respondTo
private DynamicMethod respondToMissing
private GlobalVariable recordSeparatorVar
private volatile java.lang.String currentDirectory
private volatile int currentLine
private volatile IRubyObject argsFile
private final long startTime
private final RubyInstanceConfig config
private boolean is1_9
private boolean is2_0
private java.io.InputStream in
private java.io.PrintStream out
private java.io.PrintStream err
private JavaSupport javaSupport
private JRubyClassLoader jrubyClassLoader
private BeanManager beanManager
private ParserStats parserStats
private final JITCompiler jitCompiler
private static volatile boolean securityRestricted
private final Parser parser
private LoadService loadService
private org.jcodings.Encoding defaultInternalEncoding
private org.jcodings.Encoding defaultExternalEncoding
private EncodingService encodingService
private GlobalVariables globalVariables
private final RubyWarnings warnings
private final java.util.Stack<RubyProc> atExitBlocks
private Profile profile
private KCode kcode
private final java.util.concurrent.atomic.AtomicInteger symbolLastId
private final java.util.concurrent.atomic.AtomicInteger moduleLastId
private final java.util.Set<RubyModule> allModules
private final java.util.Map<java.lang.String,org.joda.time.DateTimeZone> timeZoneCache
private java.util.Map<Finalizable,java.lang.Object> finalizers
private java.util.Map<Finalizable,java.lang.Object> internalFinalizers
private final java.lang.Object finalizersMutex
private final java.lang.Object internalFinalizersMutex
private java.util.concurrent.ExecutorService executor
private java.util.concurrent.ExecutorService fiberExecutor
private final java.lang.Object hierarchyLock
private final java.util.concurrent.atomic.AtomicLong dynamicMethodSerial
private final java.util.concurrent.atomic.AtomicInteger moduleGeneration
private final java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> boundMethods
private final SelectorPool selectorPool
private final RuntimeCache runtimeCache
private final ProfiledMethods profiledMethods
public static final java.lang.String ERRNO_BACKTRACE_MESSAGE
public static final java.lang.String STOPIERATION_BACKTRACE_MESSAGE
private final java.util.concurrent.atomic.AtomicInteger exceptionCount
private final java.util.concurrent.atomic.AtomicInteger backtraceCount
private final java.util.concurrent.atomic.AtomicInteger callerCount
private final java.util.concurrent.atomic.AtomicInteger warningCount
private Invalidator fixnumInvalidator
private Invalidator floatInvalidator
private boolean fixnumReopened
private boolean floatReopened
private volatile boolean booting
private RubyHash envObject
private final CoverageData coverageData
private static Ruby globalRuntime
private static java.lang.ThreadLocal<Ruby> threadLocalRuntime
private final java.util.Random random
private long hashSeedK0
private long hashSeedK1
private StaticScopeFactory staticScopeFactory
private IRManager irManager
private java.lang.ThreadLocal<java.util.Map<java.lang.String,RubyHash>> recursive
private RubySymbol recursiveKey
private java.lang.ThreadLocal<java.lang.Boolean> inRecursiveListOperation
private FFI ffi
private JavaProxyClassFactory javaProxyClassFactory
private final ProfilingServiceLookup profilingServiceLookup
private java.util.EnumMap<DefinedMessage,RubyString> definedMessages
private java.util.EnumMap<RubyThread.Status,RubyString> threadStatuses
private static final Ruby.ObjectSpacer DISABLED_OBJECTSPACE
private static final Ruby.ObjectSpacer ENABLED_OBJECTSPACE
private final Ruby.ObjectSpacer objectSpacer
private RubyArray emptyFrozenArray
private static final java.util.concurrent.atomic.AtomicInteger RUNTIME_NUMBER
private final int runtimeNumber
private final Config configBean
private final ClassCache classCacheBean
private final Runtime runtimeBean
private Ruby(RubyInstanceConfig config)
config - The configuration to use for the new instanceRubyInstanceConfigpublic void registerMBeans()
void reinitialize(boolean reinitCore)
public static Ruby newInstance()
RubyInstanceConfigpublic static Ruby newInstance(RubyInstanceConfig config)
config - The instance configurationRubyInstanceConfigpublic static Ruby newInstance(java.io.InputStream in, java.io.PrintStream out, java.io.PrintStream err)
in - the custom input streamout - the custom output streamerr - the custom error streamRubyInstanceConfigpublic static boolean isGlobalRuntimeReady()
private static void setGlobalRuntimeFirstTimeOnly(Ruby runtime)
runtime - the runtime to use for global runtimepublic static Ruby getGlobalRuntime()
public void useAsGlobalRuntime()
public static void clearGlobalRuntime()
public static Ruby getThreadLocalRuntime()
public static void setThreadLocalRuntime(Ruby ruby)
ruby - the new runtime for thread-localpublic IRubyObject evalScriptlet(java.lang.String script)
script - The scriptlet to runpublic IRubyObject evalScriptlet(java.lang.String script, DynamicScope scope)
script - The scriptlet to runscope - The scope to execute against (ManyVarsDynamicScope is
recommended, so it can grow as needed)public IRubyObject executeScript(java.lang.String script, java.lang.String filename)
script - The contents of the script to run as a normal, root scriptpublic void runFromMain(java.io.InputStream inputStream,
java.lang.String filename)
inputStream - The InputStream from which to read the script contentsfilename - The filename to use when parsing, and for $PROGRAM_NAME
and $0 ruby global variables.public Node parseFromMain(java.io.InputStream inputStream, java.lang.String filename)
inputStream - The input stream from which to read the scriptfilename - The filename to use for parsing@Deprecated public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean unused)
scriptNode - The root node of the script to executeprinting - Whether $_ should be printed after each loop (as in the
-p command-line flag)processLineEnds - Whether line endings should be processed by
setting $\ to $/ and chop!ing every line readsplit - Whether to split each line read using String#split
bytecode before executing.public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split)
scriptNode - The root node of the script to executeprinting - Whether $_ should be printed after each loop (as in the
-p command-line flag)processLineEnds - Whether line endings should be processed by
setting $\ to $/ and chop!ing every line readsplit - Whether to split each line read using String#split
bytecode before executing.@Deprecated public IRubyObject runNormally(Node scriptNode, boolean unused)
scriptNode - The root node of the script to be executed
bytecode before executionpublic IRubyObject runNormally(Node scriptNode)
scriptNode - The root node of the script to be executed
bytecode before executionpublic Script tryCompile(Node node)
node - The node to attempt to compiledpublic Script tryCompile(Node node, ASTInspector inspector)
node - The node to attempt to compiledinspector - The ASTInspector to use for making optimization decisionsprivate void failForcedCompile(Node scriptNode) throws RaiseException
RaiseExceptionprivate void handeCompileError(Node node, java.lang.Throwable t)
private Script tryCompile(Node node, java.lang.String cachedClassName, JRubyClassLoader classLoader, boolean dump)
private Script tryCompile(Node node, java.lang.String cachedClassName, JRubyClassLoader classLoader, ASTInspector inspector, boolean dump)
public IRubyObject runScript(Script script)
public IRubyObject runScript(Script script, boolean wrap)
public IRubyObject runScriptBody(Script script)
public IRubyObject runInterpreter(ThreadContext context, Node rootNode, IRubyObject self)
public IRubyObject runInterpreter(Node scriptNode)
public IRubyObject runInterpreterBody(Node scriptNode)
public Parser getParser()
public BeanManager getBeanManager()
public JITCompiler getJITCompiler()
public static Ruby getDefaultInstance()
@Deprecated public static Ruby getCurrentInstance()
@Deprecated public static void setCurrentInstance(Ruby runtime)
public int allocSymbolId()
public int allocModuleId()
public void addModule(RubyModule module)
public void eachModule(Function1<java.lang.Object,IRubyObject> func)
public RubyModule getModule(java.lang.String name)
name - The name of the module@Deprecated public RubyModule fastGetModule(java.lang.String internedName)
public RubyClass getClass(java.lang.String name)
name - The name of the class@Deprecated public RubyClass fastGetClass(java.lang.String internedName)
internedName - the name of the class; must be an interned String!public RubyClass defineClass(java.lang.String name, RubyClass superClass, ObjectAllocator allocator)
name - The name for the new classsuperClass - The super class for the new classallocator - An ObjectAllocator instance that can construct
instances of the new class.public RubyClass defineClass(java.lang.String name, RubyClass superClass, ObjectAllocator allocator, CallSite[] callSites)
name - The name for the new classsuperClass - The super class for the new classallocator - An ObjectAllocator instance that can construct
instances of the new class.public RubyClass defineClassUnder(java.lang.String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent)
name - The name for the new classsuperClass - The super class for the new classallocator - An ObjectAllocator instance that can construct
instances of the new class.parent - The namespace under which to define the new classpublic RubyClass defineClassUnder(java.lang.String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent, CallSite[] callSites)
name - The name for the new classsuperClass - The super class for the new classallocator - An ObjectAllocator instance that can construct
instances of the new class.parent - The namespace under which to define the new classcallSites - The array of call sites to addpublic RubyModule defineModule(java.lang.String name)
name - The name of the new modulepublic RubyModule defineModuleUnder(java.lang.String name, RubyModule parent)
name - The name of the new moduleparent - The class or module namespace under which to define the
modulepublic RubyModule getOrCreateModule(java.lang.String name)
name - The name of the modulepublic KCode getKCode()
public void setKCode(KCode kcode)
public void defineGlobalConstant(java.lang.String name,
IRubyObject value)
name - the namevalue - the valuepublic IRubyObject fetchGlobalConstant(java.lang.String name)
name - the namepublic boolean isClassDefined(java.lang.String name)
private void init()
private void bootstrap()
private void initDefinedMessages()
private void initThreadStatuses()
private void initRoot()
private void initCore()
public IRubyObject[] getNilPrefilledArray()
private void initExceptions()
private RubyClass defineClassIfAllowed(java.lang.String name, RubyClass superClass)
public RubyClass getErrno(int n)
private void initErrno()
private void createSysErr(int i,
java.lang.String name)
i - the error code (will probably use a java exception instead)name - of the error to define.private void initBuiltins()
private void initRubyKernel()
private void addLazyBuiltin(java.lang.String name,
java.lang.String shortName,
java.lang.String className)
private void addBuiltinIfAllowed(java.lang.String name,
Library lib)
public IRManager getIRManager()
public IRubyObject getTopSelf()
public IRubyObject getRootFiber()
public void setRootFiber(IRubyObject fiber)
public void setCurrentDirectory(java.lang.String dir)
public java.lang.String getCurrentDirectory()
public void setCurrentLine(int line)
public int getCurrentLine()
public void setArgsFile(IRubyObject argsFile)
public IRubyObject getArgsFile()
public RubyModule getEtc()
public void setEtc(RubyModule etcModule)
public RubyClass getObject()
public RubyClass getBasicObject()
public RubyClass getModule()
public RubyClass getClassClass()
public RubyModule getKernel()
void setKernel(RubyModule kernelModule)
public DynamicMethod getPrivateMethodMissing()
public void setPrivateMethodMissing(DynamicMethod method)
public DynamicMethod getProtectedMethodMissing()
public void setProtectedMethodMissing(DynamicMethod method)
public DynamicMethod getVariableMethodMissing()
public void setVariableMethodMissing(DynamicMethod method)
public DynamicMethod getSuperMethodMissing()
public void setSuperMethodMissing(DynamicMethod method)
public DynamicMethod getNormalMethodMissing()
public void setNormalMethodMissing(DynamicMethod method)
public DynamicMethod getDefaultMethodMissing()
public void setDefaultMethodMissing(DynamicMethod method)
public DynamicMethod getRespondToMethod()
public void setRespondToMethod(DynamicMethod rtm)
public DynamicMethod getRespondToMissingMethod()
public void setRespondToMissingMethod(DynamicMethod rtmm)
public RubyClass getDummy()
public RubyModule getComparable()
void setComparable(RubyModule comparableModule)
public RubyClass getNumeric()
void setNumeric(RubyClass numericClass)
public RubyClass getFloat()
void setFloat(RubyClass floatClass)
public RubyClass getInteger()
void setInteger(RubyClass integerClass)
public RubyClass getFixnum()
void setFixnum(RubyClass fixnumClass)
public RubyClass getComplex()
void setComplex(RubyClass complexClass)
public RubyClass getRational()
void setRational(RubyClass rationalClass)
public RubyModule getEnumerable()
void setEnumerable(RubyModule enumerableModule)
public RubyClass getEnumerator()
void setEnumerator(RubyClass enumeratorClass)
public RubyClass getYielder()
void setYielder(RubyClass yielderClass)
public RubyClass getString()
void setString(RubyClass stringClass)
public RubyClass getEncoding()
void setEncoding(RubyClass encodingClass)
public RubyClass getConverter()
void setConverter(RubyClass converterClass)
public RubyClass getSymbol()
void setSymbol(RubyClass symbolClass)
public RubyClass getArray()
void setArray(RubyClass arrayClass)
public RubyClass getHash()
void setHash(RubyClass hashClass)
public RubyClass getRange()
void setRange(RubyClass rangeClass)
public RubyBoolean getTrue()
public RubyBoolean getFalse()
public IRubyObject getNil()
public IRubyObject[] getSingleNilArray()
public RubyClass getNilClass()
void setNilClass(RubyClass nilClass)
public RubyClass getTrueClass()
void setTrueClass(RubyClass trueClass)
public RubyClass getFalseClass()
void setFalseClass(RubyClass falseClass)
public RubyClass getProc()
void setProc(RubyClass procClass)
public RubyClass getBinding()
void setBinding(RubyClass bindingClass)
public RubyClass getMethod()
void setMethod(RubyClass methodClass)
public RubyClass getUnboundMethod()
void setUnboundMethod(RubyClass unboundMethodClass)
public RubyClass getMatchData()
void setMatchData(RubyClass matchDataClass)
public RubyClass getRegexp()
void setRegexp(RubyClass regexpClass)
public RubyClass getTime()
void setTime(RubyClass timeClass)
public RubyModule getMath()
void setMath(RubyModule mathModule)
public RubyModule getMarshal()
void setMarshal(RubyModule marshalModule)
public RubyClass getBignum()
void setBignum(RubyClass bignumClass)
public RubyClass getDir()
void setDir(RubyClass dirClass)
public RubyClass getFile()
void setFile(RubyClass fileClass)
public RubyClass getFileStat()
void setFileStat(RubyClass fileStatClass)
public RubyModule getFileTest()
void setFileTest(RubyModule fileTestModule)
public RubyClass getIO()
void setIO(RubyClass ioClass)
public RubyClass getThread()
void setThread(RubyClass threadClass)
public RubyClass getThreadGroup()
void setThreadGroup(RubyClass threadGroupClass)
public RubyThreadGroup getDefaultThreadGroup()
void setDefaultThreadGroup(RubyThreadGroup defaultThreadGroup)
public RubyClass getContinuation()
void setContinuation(RubyClass continuationClass)
public RubyClass getStructClass()
void setStructClass(RubyClass structClass)
public RubyClass getRandomClass()
void setRandomClass(RubyClass randomClass)
public IRubyObject getTmsStruct()
void setTmsStruct(RubyClass tmsStruct)
public IRubyObject getPasswdStruct()
public void setPasswdStruct(RubyClass passwdStruct)
public IRubyObject getGroupStruct()
public void setGroupStruct(RubyClass groupStruct)
public RubyModule getGC()
void setGC(RubyModule gcModule)
public RubyModule getObjectSpaceModule()
void setObjectSpaceModule(RubyModule objectSpaceModule)
public RubyModule getProcess()
void setProcess(RubyModule processModule)
public RubyClass getProcStatus()
void setProcStatus(RubyClass procStatusClass)
public RubyModule getProcUID()
void setProcUID(RubyModule procUIDModule)
public RubyModule getProcGID()
void setProcGID(RubyModule procGIDModule)
public RubyModule getProcSysModule()
void setProcSys(RubyModule procSysModule)
public RubyModule getPrecision()
void setPrecision(RubyModule precisionModule)
public RubyHash getENV()
public void setENV(RubyHash env)
public RubyClass getLocation()
public void setLocation(RubyClass location)
public RubyModule getErrno()
public RubyClass getException()
void setException(RubyClass exceptionClass)
public RubyClass getNameError()
public RubyClass getNameErrorMessage()
public RubyClass getNoMethodError()
public RubyClass getSignalException()
public RubyClass getRangeError()
public RubyClass getSystemExit()
public RubyClass getLocalJumpError()
public RubyClass getNativeException()
public RubyClass getSystemCallError()
public RubyClass getKeyError()
public RubyClass getFatal()
public RubyClass getInterrupt()
public RubyClass getTypeError()
public RubyClass getArgumentError()
public RubyClass getIndexError()
public RubyClass getStopIteration()
public RubyClass getSyntaxError()
public RubyClass getStandardError()
public RubyClass getRuntimeError()
public RubyClass getIOError()
public RubyClass getLoadError()
public RubyClass getNotImplementedError()
public RubyClass getSecurityError()
public RubyClass getNoMemoryError()
public RubyClass getRegexpError()
public RubyClass getInterruptedRegexpError()
public RubyClass getEOFError()
public RubyClass getThreadError()
public RubyClass getConcurrencyError()
public RubyClass getSystemStackError()
public RubyClass getZeroDivisionError()
public RubyClass getFloatDomainError()
public RubyClass getMathDomainError()
public RubyClass getEncodingError()
public RubyClass getEncodingCompatibilityError()
public RubyClass getConverterNotFoundError()
public RubyClass getFiberError()
public RubyClass getUndefinedConversionError()
public RubyClass getInvalidByteSequenceError()
public RubyRandom.RandomType getDefaultRand()
public void setDefaultRand(RubyRandom.RandomType defaultRand)
public RubyHash getCharsetMap()
public IRubyObject getVerbose()
public boolean isVerbose()
public boolean warningsEnabled()
public void setVerbose(IRubyObject verbose)
verbose - New value of property isVerbose.public IRubyObject getDebug()
public boolean isDebug()
public void setDebug(IRubyObject debug)
debug - New value of property isDebug.public JavaSupport getJavaSupport()
public static java.lang.ClassLoader getClassLoader()
public JRubyClassLoader getJRubyClassLoader()
jrubyClassLoader will only be set in constructor. in the first call of
getJRubyClassLoader. So the field jrubyClassLoader can be final
set in the constructor directly and we avoid the synchronized here.public void defineVariable(GlobalVariable variable, GlobalVariable.Scope scope)
public void defineReadonlyVariable(java.lang.String name,
IRubyObject value,
GlobalVariable.Scope scope)
public Node parseFile(java.io.InputStream in, java.lang.String file, DynamicScope scope, int lineNumber)
public Node parseFileFromMain(java.io.InputStream in, java.lang.String file, DynamicScope scope)
public Node parseFile(java.io.InputStream in, java.lang.String file, DynamicScope scope)
public Node parseInline(java.io.InputStream in, java.lang.String file, DynamicScope scope)
private void setupSourceEncoding(ParserConfiguration parserConfig)
public Node parseEval(java.lang.String content, java.lang.String file, DynamicScope scope, int lineNumber)
@Deprecated public Node parse(java.lang.String content, java.lang.String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
public Node parseEval(org.jruby.util.ByteList content, java.lang.String file, DynamicScope scope, int lineNumber)
public Node parse(org.jruby.util.ByteList content, java.lang.String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
public ThreadService getThreadService()
public ThreadContext getCurrentContext()
public LoadService getLoadService()
public org.jcodings.Encoding getDefaultInternalEncoding()
public void setDefaultInternalEncoding(org.jcodings.Encoding defaultInternalEncoding)
public org.jcodings.Encoding getDefaultExternalEncoding()
public void setDefaultExternalEncoding(org.jcodings.Encoding defaultExternalEncoding)
public EncodingService getEncodingService()
public RubyWarnings getWarnings()
public java.io.PrintStream getErrorStream()
public java.io.InputStream getInputStream()
public java.io.PrintStream getOutputStream()
public RubyModule getClassFromPath(java.lang.String path)
public void printError(RubyException excp)
public void loadFile(java.lang.String scriptName,
java.io.InputStream in,
boolean wrap)
public void compileAndLoadFile(java.lang.String filename,
java.io.InputStream in,
boolean wrap)
public void loadScript(Script script)
public void loadScript(Script script, boolean wrap)
public void loadExtension(java.lang.String extName,
BasicLibraryService extension,
boolean wrap)
extName - The name of the extension, to go on the frame wrapping itextension - The extension object to loadwrap - Whether to use a new "self" for toplevelpublic void addBoundMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String rubyName)
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getBoundMethods()
public void setJavaProxyClassFactory(JavaProxyClassFactory factory)
public JavaProxyClassFactory getJavaProxyClassFactory()
public void addEventHook(EventHook hook)
public void removeEventHook(EventHook hook)
public void setTraceFunction(RubyProc traceFunction)
public void callEventHooks(ThreadContext context, RubyEvent event, java.lang.String file, int line, java.lang.String name, IRubyObject type)
public boolean hasEventHooks()
public GlobalVariables getGlobalVariables()
public void setGlobalVariables(GlobalVariables globalVariables)
public IRubyObject pushExitBlock(RubyProc proc)
public void addInternalFinalizer(Finalizable finalizer)
public void addFinalizer(Finalizable finalizer)
public void removeInternalFinalizer(Finalizable finalizer)
public void removeFinalizer(Finalizable finalizer)
public void tearDown()
public void tearDown(boolean systemExit)
public void releaseClassLoader()
tearDown(boolean) does not release the class-loader's
resources as threads might be still running accessing the classes/packages
even after the runtime has been torn down.
This method exists to handle such cases, e.g. with embedded uses we always
release the runtime loader but not otherwise - you should do that manually.public void printProfileData(ProfileCollection profileData)
profileData - output - private ProfilingServiceLookup getProfilingServiceLookup()
public ProfilingService getProfilingService()
public RubyArray newEmptyArray()
public RubyArray newArray()
public RubyArray newArrayLight()
public RubyArray newArray(IRubyObject object)
public RubyArray newArray(IRubyObject car, IRubyObject cdr)
public RubyArray newArray(IRubyObject... objects)
public RubyArray newArrayNoCopy(IRubyObject... objects)
public RubyArray newArrayNoCopyLight(IRubyObject... objects)
public RubyArray newArray(java.util.List<IRubyObject> list)
public RubyArray newArray(int size)
public RubyArray getEmptyFrozenArray()
public RubyBoolean newBoolean(boolean value)
public RubyFileStat newFileStat(java.lang.String filename, boolean lstat)
public RubyFileStat newFileStat(java.io.FileDescriptor descriptor)
public RubyFixnum newFixnum(long value)
public RubyFixnum newFixnum(int value)
public RubyFixnum newFixnum(jnr.constants.Constant value)
public RubyFloat newFloat(double value)
public RubyNumeric newNumeric()
public RubyRational newRational(long num, long den)
public RubyRational newRationalReduced(long num, long den)
public RubyProc newProc(Block.Type type, Block block)
public RubyProc newBlockPassProc(Block.Type type, Block block)
public RubyBinding newBinding()
public RubyBinding newBinding(Binding binding)
public RubyString newString()
public RubyString newString(java.lang.String string)
public RubyString newString(org.jruby.util.ByteList byteList)
@Deprecated public RubyString newStringShared(org.jruby.util.ByteList byteList)
public RubySymbol newSymbol(java.lang.String name)
public RubySymbol newSymbol(org.jruby.util.ByteList name)
public RubySymbol fastNewSymbol(java.lang.String internedName)
newSymbol(String) if you already have an interned
name String. Don't intern your string just to call this version - the
overhead of interning will more than wipe out any benefit from the faster
lookup.internedName - the symbol name, must be interned! if in
doubt, call newSymbol(String) instead.public RubyTime newTime(long milliseconds)
public RaiseException newRuntimeError(java.lang.String message)
public RaiseException newArgumentError(java.lang.String message)
public RaiseException newArgumentError(int got, int expected)
public RaiseException newArgumentError(java.lang.String name, int got, int expected)
public RaiseException newErrnoEBADFError()
public RaiseException newErrnoEISCONNError()
public RaiseException newErrnoEINPROGRESSError()
public RaiseException newErrnoEINPROGRESSWritableError()
public RaiseException newErrnoENOPROTOOPTError()
public RaiseException newErrnoEPIPEError()
public RaiseException newErrnoECONNABORTEDError()
public RaiseException newErrnoECONNREFUSEDError()
public RaiseException newErrnoECONNRESETError()
public RaiseException newErrnoEADDRINUSEError()
public RaiseException newErrnoEADDRINUSEError(java.lang.String message)
public RaiseException newErrnoEHOSTUNREACHError(java.lang.String message)
public RaiseException newErrnoEINVALError()
public RaiseException newErrnoENOENTError()
public RaiseException newErrnoEACCESError(java.lang.String message)
public RaiseException newErrnoEAGAINError(java.lang.String message)
public RaiseException newErrnoEAGAINReadableError(java.lang.String message)
public RaiseException newErrnoEAGAINWritableError(java.lang.String message)
public RaiseException newErrnoEISDirError(java.lang.String message)
public RaiseException newErrnoEPERMError(java.lang.String name)
public RaiseException newErrnoEISDirError()
public RaiseException newErrnoESPIPEError()
public RaiseException newErrnoEBADFError(java.lang.String message)
public RaiseException newErrnoEINPROGRESSError(java.lang.String message)
public RaiseException newErrnoEINPROGRESSWritableError(java.lang.String message)
public RaiseException newErrnoEISCONNError(java.lang.String message)
public RaiseException newErrnoEINVALError(java.lang.String message)
public RaiseException newErrnoENOTDIRError(java.lang.String message)
public RaiseException newErrnoENOTEMPTYError(java.lang.String message)
public RaiseException newErrnoENOTSOCKError(java.lang.String message)
public RaiseException newErrnoENOTCONNError(java.lang.String message)
public RaiseException newErrnoENOTCONNError()
public RaiseException newErrnoENOENTError(java.lang.String message)
public RaiseException newErrnoESPIPEError(java.lang.String message)
public RaiseException newErrnoEEXISTError(java.lang.String message)
public RaiseException newErrnoEDOMError(java.lang.String message)
public RaiseException newErrnoECHILDError()
public RaiseException newErrnoEADDRNOTAVAILError(java.lang.String message)
public RaiseException newErrnoESRCHError()
public RaiseException newErrnoEWOULDBLOCKError()
public RaiseException newErrnoEDESTADDRREQError(java.lang.String func)
public RaiseException newIndexError(java.lang.String message)
public RaiseException newSecurityError(java.lang.String message)
public RaiseException newSystemCallError(java.lang.String message)
public RaiseException newKeyError(java.lang.String message)
public RaiseException newErrnoFromLastPOSIXErrno()
public RaiseException newErrnoFromInt(int errno, java.lang.String methodName, java.lang.String message)
public RaiseException newErrnoFromInt(int errno, java.lang.String message)
public RaiseException newErrnoFromInt(int errno)
public RaiseException newErrnoEADDRFromBindException(java.net.BindException be)
public RaiseException newErrnoEADDRFromBindException(java.net.BindException be, java.lang.String contextMessage)
public RaiseException newTypeError(java.lang.String message)
public RaiseException newThreadError(java.lang.String message)
public RaiseException newConcurrencyError(java.lang.String message)
public RaiseException newSyntaxError(java.lang.String message)
public RaiseException newRegexpError(java.lang.String message)
public RaiseException newInterruptedRegexpError(java.lang.String message)
public RaiseException newRangeError(java.lang.String message)
public RaiseException newNotImplementedError(java.lang.String message)
public RaiseException newInvalidEncoding(java.lang.String message)
public RaiseException newIllegalSequence(java.lang.String message)
public RaiseException newNoMethodError(java.lang.String message, java.lang.String name, IRubyObject args)
public RaiseException newNameError(java.lang.String message, java.lang.String name)
public RaiseException newNameErrorObject(java.lang.String message, IRubyObject name)
public RaiseException newNameError(java.lang.String message, java.lang.String name, java.lang.Throwable origException)
public RaiseException newNameError(java.lang.String message, java.lang.String name, java.lang.Throwable origException, boolean printWhenVerbose)
public RaiseException newLocalJumpError(RubyLocalJumpError.Reason reason, IRubyObject exitValue, java.lang.String message)
public RaiseException newLocalJumpErrorNoBlock()
public RaiseException newRedoLocalJumpError()
public RaiseException newLoadError(java.lang.String message)
public RaiseException newLoadError(java.lang.String message, java.lang.String path)
public RaiseException newFrozenError(java.lang.String objectType)
public RaiseException newFrozenError(java.lang.String objectType, boolean runtimeError)
public RaiseException newSystemStackError(java.lang.String message)
public RaiseException newSystemStackError(java.lang.String message, java.lang.StackOverflowError soe)
public RaiseException newSystemExit(int status)
public RaiseException newSystemExit(int status, java.lang.String message)
public RaiseException newIOError(java.lang.String message)
public RaiseException newStandardError(java.lang.String message)
public RaiseException newIOErrorFromException(java.io.IOException ioe)
public RaiseException newTypeError(IRubyObject receivedObject, RubyClass expectedType)
public RaiseException newTypeError(IRubyObject receivedObject, RubyModule expectedType)
public RaiseException newTypeError(IRubyObject receivedObject, java.lang.String expectedType)
public RaiseException newEOFError()
public RaiseException newEOFError(java.lang.String message)
public RaiseException newZeroDivisionError()
public RaiseException newFloatDomainError(java.lang.String message)
public RaiseException newMathDomainError(java.lang.String message)
public RaiseException newEncodingError(java.lang.String message)
public RaiseException newEncodingCompatibilityError(java.lang.String message)
public RaiseException newConverterNotFoundError(java.lang.String message)
public RaiseException newFiberError(java.lang.String message)
public RaiseException newUndefinedConversionError(java.lang.String message)
public RaiseException newInvalidByteSequenceError(java.lang.String message)
public RaiseException newRaiseException(RubyClass exceptionClass, java.lang.String message)
exceptionClass - message - private RaiseException newLightweightErrnoException(RubyClass exceptionClass, java.lang.String message)
exceptionClass - message - public RaiseException newLightweightStopIterationError(java.lang.String message)
message - the message for the exceptionpublic RubyObject.Data newData(RubyClass objectClass, java.lang.Object sval)
public RubySymbol.SymbolTable getSymbolTable()
public ObjectSpace getObjectSpace()
public void putFilenoMap(int external,
int internal)
public int getFilenoExtMap(int external)
public int getFilenoIntMap(int internal)
public int getFilenoIntMapSize()
public void removeFilenoIntMap(int internal)
public int getFileno(ChannelDescriptor descriptor)
descriptor - The descriptor for which to getService the fileno@Deprecated public void registerDescriptor(ChannelDescriptor descriptor, boolean isRetained)
@Deprecated public void registerDescriptor(ChannelDescriptor descriptor)
@Deprecated public void unregisterDescriptor(int aFileno)
@Deprecated public ChannelDescriptor getDescriptorByFileno(int aFileno)
public java.io.InputStream getIn()
public java.io.PrintStream getOut()
public java.io.PrintStream getErr()
public boolean isGlobalAbortOnExceptionEnabled()
public void setGlobalAbortOnExceptionEnabled(boolean enable)
public boolean isDoNotReverseLookupEnabled()
public void setDoNotReverseLookupEnabled(boolean b)
public void registerInspecting(java.lang.Object obj)
public boolean isInspecting(java.lang.Object obj)
public void unregisterInspecting(java.lang.Object obj)
private IRubyObject recursiveListAccess()
private void recursiveListClear()
private void recursivePush(IRubyObject list, IRubyObject obj, IRubyObject paired_obj)
private void recursivePop(IRubyObject list, IRubyObject obj, IRubyObject paired_obj)
private boolean recursiveCheck(IRubyObject list, IRubyObject obj_id, IRubyObject paired_obj_id)
private IRubyObject execRecursiveI(Ruby.ExecRecursiveParams p)
private IRubyObject execRecursiveInternal(Ruby.RecursiveFunction func, IRubyObject obj, IRubyObject pairid, boolean outer)
public IRubyObject execRecursive(Ruby.RecursiveFunction func, IRubyObject obj)
recursiveListOperation,
which will ensure the thread-local recursion tracking data structs are
cleared.
MRI: rb_exec_recursive
Calls func(obj, arg, recursive), where recursive is non-zero if the
current method is called recursively on objfunc - obj - public IRubyObject execRecursiveOuter(Ruby.RecursiveFunction func, IRubyObject obj)
func - obj - public <T extends IRubyObject> T recursiveListOperation(java.util.concurrent.Callable<T> body)
execRecursive.
Clean up recursive structures once complete.T - body - public boolean isObjectSpaceEnabled()
public void setObjectSpaceEnabled(boolean objectSpaceEnabled)
public boolean isSiphashEnabled()
public long getStartTime()
public Profile getProfile()
public java.lang.String getJRubyHome()
public void setJRubyHome(java.lang.String home)
public RubyInstanceConfig getInstanceConfig()
public boolean is1_8()
public boolean is1_9()
public boolean is2_0()
public long getGlobalState()
public void incGlobalState()
public static boolean isSecurityRestricted()
public static void setSecurityRestricted(boolean restricted)
public jnr.posix.POSIX getPosix()
public void setRecordSeparatorVar(GlobalVariable recordSeparatorVar)
public GlobalVariable getRecordSeparatorVar()
public java.util.Set<Script> getJittedMethods()
public java.util.concurrent.ExecutorService getExecutor()
public java.util.concurrent.ExecutorService getFiberExecutor()
public java.util.Map<java.lang.String,org.joda.time.DateTimeZone> getTimezoneCache()
@Deprecated public int getConstantGeneration()
public Invalidator getConstantInvalidator(java.lang.String constantName)
private Invalidator addConstantInvalidator(java.lang.String constantName)
public Invalidator getCheckpointInvalidator()
public <E extends java.lang.Enum<E>> void loadConstantSet(RubyModule module, java.lang.Class<E> enumClass)
public void loadConstantSet(RubyModule module, java.lang.String constantSetName)
public long getNextDynamicMethodSerial()
public int getNextModuleGeneration()
public java.lang.Object getHierarchyLock()
public SelectorPool getSelectorPool()
public RuntimeCache getRuntimeCache()
@Deprecated public ProfiledMethods getProfiledMethods()
@Deprecated
void addProfiledMethod(java.lang.String name,
DynamicMethod method)
name - the name of the methodmethod - public void incrementExceptionCount()
public int getExceptionCount()
public void incrementBacktraceCount()
public int getBacktraceCount()
public void incrementWarningCount()
public int getWarningCount()
public void incrementCallerCount()
public int getCallerCount()
public void reopenFixnum()
public Invalidator getFixnumInvalidator()
public boolean isFixnumReopened()
public void reopenFloat()
public Invalidator getFloatInvalidator()
public boolean isFloatReopened()
public boolean isBooting()
public CoverageData getCoverageData()
public java.util.Random getRandom()
public long getHashSeedK0()
public long getHashSeedK1()
public StaticScopeFactory getStaticScopeFactory()
public FFI getFFI()
public void setFFI(FFI ffi)
public RubyString getDefinedMessage(DefinedMessage definedMessage)
public RubyString getThreadStatus(RubyThread.Status status)
public int getRuntimeNumber()
private void setNetworkStack()
@Deprecated public int getSafeLevel()
@Deprecated public void setSafeLevel(int safeLevel)
@Deprecated public void checkSafeString(IRubyObject object)
@Deprecated public void secure(int level)
@Deprecated public CallbackFactory callbackFactory(java.lang.Class<?> type)
public void addToObjectSpace(boolean useObjectSpace,
IRubyObject object)