public final class Ruby extends Object implements Constantizable
Modifier and Type | Class and Description |
---|---|
class |
Ruby.CallTraceFuncHook |
static interface |
Ruby.ObjectSpacer |
static interface |
Ruby.RecursiveFunction
Deprecated.
|
static interface |
Ruby.RecursiveFunctionEx<T> |
Modifier and Type | Field and Description |
---|---|
static String |
ERRNO_BACKTRACE_MESSAGE |
static int |
NIL_PREFILLED_ARRAY_SIZE |
ClassValue<TypePopulator> |
POPULATORS |
JavaSites |
sites |
static String |
STOPIERATION_BACKTRACE_MESSAGE |
public static final int NIL_PREFILLED_ARRAY_SIZE
public static final String ERRNO_BACKTRACE_MESSAGE
public static final String STOPIERATION_BACKTRACE_MESSAGE
public final ClassValue<TypePopulator> POPULATORS
public final JavaSites sites
public void registerMBeans()
public static Ruby newInstance()
RubyInstanceConfig
public static Ruby newInstance(RubyInstanceConfig config)
config
- The instance configurationRubyInstanceConfig
public static Ruby newInstance(InputStream in, PrintStream out, PrintStream err)
in
- the custom input streamout
- the custom output streamerr
- the custom error streamRubyInstanceConfig
public static boolean isGlobalRuntimeReady()
public 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(String script)
script
- The scriptlet to runpublic IRubyObject evalScriptlet(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(String script, String filename)
script
- The contents of the script to run as a normal, root scriptpublic void runFromMain(InputStream inputStream, 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(InputStream inputStream, String filename)
inputStream
- The input stream from which to read the scriptfilename
- The filename to use for parsingpublic ParseResult parseFromMain(String fileName, InputStream in)
@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(RootNode 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.public IRubyObject runNormally(Node scriptNode, boolean wrap)
scriptNode
- The root node of the script to be executed
bytecode before executionwrap
- whether to wrap the execution in an anonymous modulepublic 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 IRubyObject runScript(Script script)
public IRubyObject runScript(Script script, boolean wrap)
public IRubyObject runScriptBody(Script script)
public IRubyObject runInterpreter(ThreadContext context, ParseResult parseResult, IRubyObject self)
public IRubyObject runInterpreter(ThreadContext context, Node rootNode, IRubyObject self)
public IRubyObject runInterpreter(Node scriptNode)
public IRubyObject runInterpreter(ParseResult parseResult)
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<Object,IRubyObject> func)
public RubyModule getModule(String name)
name
- The name of the module@Deprecated public RubyModule fastGetModule(String internedName)
public RubyClass getClass(String name)
name
- The name of the class@Deprecated public RubyClass fastGetClass(String internedName)
internedName
- the name of the class; must be an interned String!public RubyClass defineClass(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(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(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(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(String name)
name
- The name of the new modulepublic RubyModule defineModuleUnder(String name, RubyModule parent)
name
- The name of the new moduleparent
- The class or module namespace under which to define the
modulepublic RubyModule getOrCreateModule(String name)
name
- The name of the modulepublic KCode getKCode()
public void setKCode(KCode kcode)
public void defineGlobalConstant(String name, IRubyObject value)
name
- the namevalue
- the valuepublic IRubyObject fetchGlobalConstant(String name)
name
- the namepublic boolean isClassDefined(String name)
public JavaSupport loadJavaSupport()
public IRubyObject[] getNilPrefilledArray()
public RubyClass getErrno(int n)
public IRManager getIRManager()
public IRubyObject getTopSelf()
public IRubyObject getRootFiber()
public void setRootFiber(IRubyObject fiber)
public void setCurrentDirectory(String dir)
public 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()
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 boolean isDefaultMethodMissing(DynamicMethod method)
public void setDefaultMethodMissing(DynamicMethod method, DynamicMethod moduleMethod)
public DynamicMethod getRespondToMethod()
public void setRespondToMethod(DynamicMethod rtm)
public DynamicMethod getRespondToMissingMethod()
public void setRespondToMissingMethod(DynamicMethod rtmm)
public RubyClass getDummy()
public RubyModule getComparable()
public RubyClass getNumeric()
public RubyClass getFloat()
public RubyClass getInteger()
public RubyClass getFixnum()
public RubyClass getComplex()
public RubyClass getRational()
public RubyModule getEnumerable()
public RubyClass getEnumerator()
public RubyClass getYielder()
public RubyClass getGenerator()
public void setGenerator(RubyClass generatorClass)
public RubyClass getFiber()
public void setFiber(RubyClass fiberClass)
public RubyClass getString()
public RubyClass getEncoding()
public RubyClass getConverter()
public RubyClass getSymbol()
public RubyClass getArray()
public RubyClass getHash()
public RubyClass getRange()
public RubyBoolean getTrue()
public RubyBoolean getFalse()
public IRubyObject getNil()
public IRubyObject[] getSingleNilArray()
public RubyClass getNilClass()
public RubyClass getTrueClass()
public RubyClass getFalseClass()
public RubyClass getProc()
public RubyClass getBinding()
public RubyClass getMethod()
public RubyClass getUnboundMethod()
public RubyClass getMatchData()
public RubyClass getRegexp()
public RubyClass getTime()
public RubyModule getMath()
public RubyModule getMarshal()
public RubyClass getBignum()
public RubyClass getDir()
public RubyClass getFile()
public RubyClass getFileStat()
public RubyModule getFileTest()
public RubyClass getIO()
public RubyClass getThread()
public RubyClass getThreadGroup()
public RubyThreadGroup getDefaultThreadGroup()
public RubyClass getContinuation()
public RubyClass getStructClass()
public RubyClass getRandomClass()
public IRubyObject getTmsStruct()
public IRubyObject getPasswdStruct()
public void setPasswdStruct(RubyClass passwdStruct)
public IRubyObject getGroupStruct()
public void setGroupStruct(RubyClass groupStruct)
public RubyModule getGC()
public RubyModule getObjectSpaceModule()
public RubyModule getProcess()
public RubyClass getProcStatus()
public RubyModule getProcUID()
public RubyModule getProcGID()
public RubyModule getProcSysModule()
public RubyModule getPrecision()
public RubyHash getENV()
public void setENV(RubyHash env)
public RubyClass getLocation()
public void setLocation(RubyClass location)
public RubyModule getErrno()
public RubyClass getException()
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 getUncaughtThrowError()
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 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(String name, IRubyObject value, GlobalVariable.Scope scope)
public Node parseFile(InputStream in, String file, DynamicScope scope)
public ParseResult parseFile(String file, InputStream in, DynamicScope scope)
public Node parseFile(InputStream in, String file, DynamicScope scope, int lineNumber)
public ParseResult parseFile(String file, InputStream in, DynamicScope scope, int lineNumber)
public Node parseFileFromMain(InputStream in, String file, DynamicScope scope)
public ParseResult parseFileFromMain(String file, InputStream in, DynamicScope scope)
public Node parseInline(InputStream in, String file, DynamicScope scope)
public Node parseEval(String content, String file, DynamicScope scope, int lineNumber)
@Deprecated public Node parse(String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
public Node parseEval(org.jruby.util.ByteList content, String file, DynamicScope scope, int lineNumber)
public Node parse(org.jruby.util.ByteList content, 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 Charset getDefaultCharset()
public EncodingService getEncodingService()
public RubyWarnings getWarnings()
public PrintStream getErrorStream()
public InputStream getInputStream()
public PrintStream getOutputStream()
public RubyModule getClassFromPath(String path)
public void printError(RubyException excp)
public void loadFile(String scriptName, InputStream in, boolean wrap)
public void loadScope(IRScope scope, boolean wrap)
public void compileAndLoadFile(String filename, InputStream in, boolean wrap)
public void loadScript(Script script)
public void loadScript(Script script, boolean wrap)
public void loadExtension(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 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, String file, int line, 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
- 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(List<IRubyObject> list)
public RubyArray newArray(int size)
public RubyArray getEmptyFrozenArray()
public RubyBoolean newBoolean(boolean value)
public RubyFileStat newFileStat(String filename, boolean lstat)
public RubyFileStat newFileStat(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(String string)
public RubyString newString(org.jruby.util.ByteList byteList)
@Deprecated public RubyString newStringShared(org.jruby.util.ByteList byteList)
public RubySymbol newSymbol(String name)
public RubySymbol newSymbol(String name, org.jcodings.Encoding encoding)
public RubySymbol newSymbol(org.jruby.util.ByteList name)
public RubySymbol fastNewSymbol(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(String message)
public RaiseException newArgumentError(String message)
public RaiseException newArgumentError(int got, int expected)
public RaiseException newArgumentError(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 newErrnoECONNREFUSEDError(String message)
public RaiseException newErrnoECONNRESETError()
public RaiseException newErrnoEADDRINUSEError()
public RaiseException newErrnoEADDRINUSEError(String message)
public RaiseException newErrnoEHOSTUNREACHError(String message)
public RaiseException newErrnoEINVALError()
public RaiseException newErrnoELOOPError()
public RaiseException newErrnoEMFILEError()
public RaiseException newErrnoENFILEError()
public RaiseException newErrnoENOENTError()
public RaiseException newErrnoEACCESError(String message)
public RaiseException newErrnoEAGAINError(String message)
public RaiseException newErrnoEAGAINReadableError(String message)
public RaiseException newErrnoEAGAINWritableError(String message)
public RaiseException newErrnoEISDirError(String message)
public RaiseException newErrnoEPERMError(String name)
public RaiseException newErrnoEISDirError()
public RaiseException newErrnoESPIPEError()
public RaiseException newErrnoEBADFError(String message)
public RaiseException newErrnoEINPROGRESSError(String message)
public RaiseException newErrnoEINPROGRESSWritableError(String message)
public RaiseException newErrnoEISCONNError(String message)
public RaiseException newErrnoEINVALError(String message)
public RaiseException newErrnoENOTDIRError(String message)
public RaiseException newErrnoENOTEMPTYError(String message)
public RaiseException newErrnoENOTSOCKError(String message)
public RaiseException newErrnoENOTCONNError(String message)
public RaiseException newErrnoENOTCONNError()
public RaiseException newErrnoENOENTError(String message)
public RaiseException newErrnoEOPNOTSUPPError(String message)
public RaiseException newErrnoESPIPEError(String message)
public RaiseException newErrnoEEXISTError(String message)
public RaiseException newErrnoEDOMError(String message)
public RaiseException newErrnoECHILDError()
public RaiseException newErrnoEADDRNOTAVAILError(String message)
public RaiseException newErrnoESRCHError()
public RaiseException newErrnoEWOULDBLOCKError()
public RaiseException newErrnoEDESTADDRREQError(String func)
public RaiseException newErrnoENETUNREACHError()
public RaiseException newIndexError(String message)
public RaiseException newSecurityError(String message)
public RaiseException newSystemCallError(String message)
public RaiseException newKeyError(String message)
public RaiseException newErrnoEINTRError()
public RaiseException newErrnoEAFNOSUPPORTError(String message)
public RaiseException newErrnoFromLastPOSIXErrno()
public RaiseException newErrnoFromInt(int errno, String methodName, String message)
public RaiseException newErrnoFromInt(int errno, String message)
public RaiseException newErrnoFromErrno(jnr.constants.platform.Errno errno, String message)
public RaiseException newErrnoFromInt(int errno)
public RaiseException newErrnoEADDRFromBindException(BindException be)
public RaiseException newErrnoEADDRFromBindException(BindException be, String contextMessage)
public RaiseException newTypeError(String message)
public RaiseException newThreadError(String message)
public RaiseException newConcurrencyError(String message)
public RaiseException newSyntaxError(String message)
public RaiseException newRegexpError(String message)
public RaiseException newInterruptedRegexpError(String message)
public RaiseException newRangeError(String message)
public RaiseException newNotImplementedError(String message)
@Deprecated public RaiseException newInvalidEncoding(String message)
@Deprecated public RaiseException newIllegalSequence(String message)
public RaiseException newNameError(String message, IRubyObject recv, IRubyObject name)
message
- an sprintf format string for the messagerecv
- the receiver objectname
- the name that failedpublic RaiseException newNameError(String message, IRubyObject recv, String name)
public RaiseException newNameError(String message, String name, Throwable origException, boolean printWhenVerbose)
message
- the pre-formatted message for the NameErrorname
- the name that failedorigException
- the original exception, or nullprintWhenVerbose
- whether to log this exception when verbose mode is enabledpublic RaiseException newNameError(String message, String name)
newNameError(String, String, Throwable)
with a null
originating exception.message
- the pre-formatted message for the errorname
- the name that failedpublic RaiseException newNameError(String message, String name, Throwable origException)
newNameError(String, String, Throwable, boolean)
with a null
originating exception and false for verbose-mode logging.message
- a formatted string message for the errorname
- the name that failedorigException
- the original exception, or null if nonepublic RaiseException newNoMethodError(String message, IRubyObject recv, String name, RubyArray args)
newNameError(String, IRubyObject, IRubyObject)
but accepts
a java.lang.String for name and a RubyArray of the original call arguments.newNameError(String, IRubyObject, IRubyObject)
public RaiseException newNoMethodError(String message, String name, IRubyObject args)
message
- the pre-formatted messagename
- the name that failedargs
- the original arguments to the call that failedpublic RaiseException newLocalJumpError(RubyLocalJumpError.Reason reason, IRubyObject exitValue, String message)
public RaiseException newLocalJumpErrorNoBlock()
public RaiseException newRedoLocalJumpError()
public RaiseException newLoadError(String message)
public RaiseException newLoadError(String message, String path)
public RaiseException newFrozenError(String objectType)
public RaiseException newFrozenError(String objectType, boolean runtimeError)
public RaiseException newSystemStackError(String message)
public RaiseException newSystemStackError(String message, StackOverflowError soe)
public RaiseException newSystemExit(int status)
public RaiseException newSystemExit(int status, String message)
public RaiseException newIOError(String message)
public RaiseException newStandardError(String message)
public RaiseException newIOErrorFromException(IOException ex)
public RaiseException newTypeError(IRubyObject receivedObject, RubyClass expectedType)
public RaiseException newTypeError(IRubyObject receivedObject, RubyModule expectedType)
public RaiseException newTypeError(IRubyObject receivedObject, String expectedType)
public RaiseException newEOFError()
public RaiseException newEOFError(String message)
public RaiseException newZeroDivisionError()
public RaiseException newFloatDomainError(String message)
public RaiseException newMathDomainError(String message)
public RaiseException newEncodingError(String message)
public RaiseException newEncodingCompatibilityError(String message)
public RaiseException newConverterNotFoundError(String message)
public RaiseException newFiberError(String message)
public RaiseException newUndefinedConversionError(String message)
public RaiseException newInvalidByteSequenceError(String message)
public RaiseException newRaiseException(RubyClass exceptionClass, String message)
exceptionClass
- message
- public RaiseException newStopIteration(IRubyObject result, String message)
message
- the message for the exception@Deprecated public RaiseException newLightweightStopIterationError(String message)
public RubyObject.Data newData(RubyClass objectClass, Object sval)
public RubySymbol.SymbolTable getSymbolTable()
public ObjectSpace getObjectSpace()
public InputStream getIn()
public PrintStream getOut()
public PrintStream getErr()
public boolean isGlobalAbortOnExceptionEnabled()
public void setGlobalAbortOnExceptionEnabled(boolean enable)
public boolean isDoNotReverseLookupEnabled()
public void setDoNotReverseLookupEnabled(boolean b)
public void registerInspecting(Object obj)
public boolean isInspecting(Object obj)
public void unregisterInspecting(Object obj)
public boolean isObjectSpaceEnabled()
public void setObjectSpaceEnabled(boolean objectSpaceEnabled)
public boolean isSiphashEnabled()
public long getStartTime()
public Profile getProfile()
public String getJRubyHome()
public void setJRubyHome(String home)
public RubyInstanceConfig getInstanceConfig()
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 ExecutorService getExecutor()
public ExecutorService getFiberExecutor()
@Deprecated public int getConstantGeneration()
public Invalidator getConstantInvalidator(String constantName)
public Invalidator getCheckpointInvalidator()
public <E extends Enum<E>> void loadConstantSet(RubyModule module, Class<E> enumClass)
public void loadConstantSet(RubyModule module, String constantSetName)
public long getNextDynamicMethodSerial()
public int getNextModuleGeneration()
public Object getHierarchyLock()
public SelectorPool getSelectorPool()
public RuntimeCache getRuntimeCache()
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 isBootingCore()
public boolean isBooting()
public CoverageData getCoverageData()
public 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 RubyString freezeAndDedupString(RubyString string)
string
- the string to freeze-dup if an equivalent does not already existpublic int getRuntimeNumber()
public Object constant()
constant
in interface Constantizable
Constantizable
public void setBaseNewMethod(DynamicMethod baseNewMethod)
baseNewMethod
- public DynamicMethod getBaseNewMethod()
public java.lang.invoke.MethodHandle getNullToNilHandle()
public FilenoUtil getFilenoUtil()
@Deprecated public int getSafeLevel()
@Deprecated public void setSafeLevel(int safeLevel)
@Deprecated public void checkSafeString(IRubyObject object)
@Deprecated public void secure(int level)
@Deprecated public RaiseException newNameErrorObject(String message, IRubyObject name)
@Deprecated public boolean is1_8()
@Deprecated public boolean is1_9()
@Deprecated public IRubyObject safeRecurse(Ruby.RecursiveFunction func, IRubyObject obj, String name, boolean outer)
@Deprecated public ProfiledMethods getProfiledMethods()
@Deprecated public <T> IRubyObject safeRecurse(Ruby.RecursiveFunctionEx<T> func, ThreadContext context, T state, IRubyObject obj, String name, boolean outer)
@Deprecated 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
- @Deprecated public IRubyObject execRecursiveOuter(Ruby.RecursiveFunction func, IRubyObject obj)
func
- obj
- @Deprecated public <T extends IRubyObject> T recursiveListOperation(Callable<T> body)
execRecursive
.
Clean up recursive structures once complete.T
- body
- public void addToObjectSpace(boolean useObjectSpace, IRubyObject object)
Copyright © 2001-2017 JRuby. All Rights Reserved.