Package org.jruby
Class RubyInstanceConfig
java.lang.Object
org.jruby.RubyInstanceConfig
A structure used to configure new JRuby instances. All publicly-tweakable
aspects of Ruby can be modified here, including those settable by command-
line options, those available through JVM properties, and those suitable for
embedding.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfacestatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanWhether native code is enabled for this configuration.private booleanprivate String[]private booleanprivate booleanprivate booleanprivate booleanprivate booleanstatic final booleanDeprecated.static final booleanDeprecated.static final intDeprecated.static final intDeprecated.static final StringComma-separated list of methods to exclude from JIT compilation.private RubyInstanceConfig.CompileModestatic final booleanWhether to calculate consistent hashes across JVM instances, or to ensure un-predicatable hash values using SecureRandom.static final booleanDeprecated.private Stringprivate booleanstatic final booleanTurn on debugging of subprocess launching.static final booleanTurn on debugging of the load service (requires and loads).static final booleanTurn on timings of the load service (requires and loads).static final booleanstatic final booleanTurn on debugging of script resolution with "-S".private booleanprivate booleanprivate booleanprivate booleanprivate booleanEnvironment variables; defaults to System.getenv() in constructorstatic final booleanprivate PrintStreamprivate Stringstatic booleanDeprecated.static final booleanDeprecated.static final booleanEnable fast operator compiler optimizations.static booleanDeprecated.static final intFiber thread pool time-to-live in seconds.private booleanprivate booleanstatic booleanEnable tracing of method calls.private booleanDeprecated.private booleanprivate booleanprivate booleanprivate booleanIndicates whether the script has a shebang line or notprivate final StringBufferprivate Stringprivate InputStreamprivate Stringstatic final booleanprivate Stringprivate final booleanstatic booleanstatic final Stringstatic booleanstatic final Stringstatic Stringstatic final Stringstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanprivate final booleanstatic final intThe version to use for generated classes.static final booleanDeprecated.static final StringDeprecated.static final booleanDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.private booleanprivate final booleanDeprecated.private intprivate final booleanprivate final booleanprivate intprivate intprivate intprivate Stringstatic final booleanprivate KCodeprivate booleanprivate static booleanprivate ClassLoaderprivate booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanprivate booleanstatic final booleanIndicates the global default for whether native code is enabled.static final booleanDeprecated.static final booleanDeprecated.static final booleanstatic booleanDeprecated.private booleanprivate PrintStreamprivate booleanstatic final booleanDeprecated.static final intMaximum thread pool size (integer, default Integer.MAX_VALUE).static final intMinimum thread pool size (integer, default 0).static final intThread pool time-to-live in seconds.static final booleanEnable a thread pool.private booleanprivate Profileprivate intprivate ProfileOutputprivate RubyInstanceConfig.ProfilingModeprivate Stringstatic booleanprivate Stringstatic final booleanDeprecated.static final booleanLog errors that occur during reification.static final booleanWhether to reify (pre-compile and generate) a Java class per Ruby class.private final Collection<String>private static final Patternprivate booleanDeprecated.private Stringstatic final booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Stringprivate booleanstatic final booleanprivate StringDeprecated.static booleanDeprecated.private TraceTypeprivate booleanstatic final booleanDeprecated.private RubyInstanceConfig.Verbosityprivate booleanIndicates whether the script must be extracted from script source -
Constructor Summary
ConstructorsConstructorDescriptionRubyInstanceConfig(boolean isSecurityRestricted) RubyInstanceConfig(InputStream in, PrintStream out, PrintStream err) RubyInstanceConfig(RubyInstanceConfig parentConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLoader(ClassLoader loader) adds a given ClassLoader to jruby.voidadds a given "bundle" to jruby.private StringcreateLoadService(Ruby runtime) static ClassLoaderprivate voidprivate static InputStreambooleanget whether uppercase package names will be honoredString[]getArgv()booleanTrue if colorized backtraces are enabled.booleanWhether to mask .java lines in the Ruby backtrace, as MRI does for C calls.Deprecated.Deprecated.Deprecated.getError()Deprecated.booleanDeprecated.getInput()booleanDeprecated.booleanGet whether the JIT compiler will run in a background thread.intintintintgetKCode()booleanGet Kernel#gsub is defined or notbooleanWhether to load and setup bundler on startup.booleanintGet the maximum number of methods to consider when profiling.Deprecated.intbooleanbooleanbooleanbooleanDeprecated.Deprecated.Deprecated.booleanstatic booleanbooleanprivate voidprivate static intbyte[]booleanbooleanbooleanbooleanDeprecated.booleanDeprecated.booleanGet whether to use the self-first jruby classloader.booleanisDebug()booleanbooleanbooleanbooleanTrue if we are only using source from stdin and not from a -e or file argument.booleanbooleanDeprecated.booleanbooleanbooleanbooleanDeprecated.booleanbooleanbooleanbooleanbooleanGet whether native code is enabled for this config.booleanbooleanbooleanbooleanbooleanprotected static booleanisRubyShebangLine(String line) booleanbooleanDeprecated.private booleanisShebang(InputStreamMarkCursor cursor) booleanDeprecated.booleanbooleanbooleanbooleanbooleanisSplit()booleanIndicates whether the JVM process' native environment will be updated when ENV[...] is set from Ruby.booleanbooleanisxFlag()Deprecated.booleanisXFlag()Deprecated.String[]The intent here is to gather up any options that might have been specified in the shebang line and return them so they can be merged into the ones specified on the command-line.voidprocessArguments(String[] arguments) voidDeprecated.private voidvoidsetAllowUppercasePackageNames(boolean allow) set whether uppercase package names will be honoredvoidvoidsetArgvGlobalsOn(boolean argvGlobalsOn) voidsetAssumeLoop(boolean assumeLoop) voidsetAssumePrinting(boolean assumePrinting) voidsetBacktraceColor(boolean backtraceColor) Set to true to enable colorized backtraces.voidsetBacktraceMask(boolean backtraceMask) Set whether to mask .java lines in the Ruby backtrace.voidsetBenchmarking(boolean benchmarking) Deprecated.voidsetCextEnabled(boolean b) Deprecated.voidsetClassloaderDelegate(boolean b) Set whether to use the self-first jruby classloader.voidsetCompatVersion(CompatVersion compatVersion) Deprecated.voidsetCompileMode(RubyInstanceConfig.CompileMode compileMode) voidsetCurrentDirectory(String newCurrentDirectory) voidsetDebug(boolean debug) voidsetDebuggingFrozenStringLiteral(boolean debuggingFrozenStringLiteral) voidsetDisableDidYouMean(boolean ddym) voidsetDisableGems(boolean dg) voidsetDisableRUBYOPT(boolean dr) voidsetEnvironment(Map<String, String> newEnvironment) voidsetError(PrintStream newError) voidsetExternalEncoding(String externalEncoding) voidsetForceStdin(boolean forceStdin) Set whether we should only look at stdin for source.voidsetFrozenStringLiteral(boolean frozenStringLiteral) voidsetGlobalRequireLock(boolean globalRequireLock) Deprecated.voidsetHardExit(boolean hardExit) voidsetHasInlineScript(boolean hasInlineScript) voidsetHasScriptArgv(boolean argvRemains) voidsetHasShebangLine(boolean hasShebangLine) voidsetInPlaceBackupExtension(String inPlaceBackupExtension) voidsetInput(InputStream newInput) voidsetInputFieldSeparator(String inputFieldSeparator) voidsetInternalEncoding(String internalEncoding) voidsetJitBackground(boolean jitBackground) Set whether the JIT compiler should run in a background thread (Executor-based).voidsetJitLogEvery(int jitLogEvery) voidsetJitMax(int jitMax) voidsetJitMaxSize(int jitMaxSize) voidsetJitThreshold(int jitThreshold) voidsetJRubyHome(String home) voidvoidsetKernelGsubDefined(boolean setDefineKernelGsub) Set whether Kernel#gsub should be definedstatic voidsetLoadedNativeExtensions(boolean loadedNativeExtensions) voidsetLoader(ClassLoader loader) voidsetLoadGemfile(boolean loadGemfile) Set whether to load and setup bundler on startup.voidsetLoadPaths(List<String> loadPaths) voidvoidsetNativeEnabled(boolean b) Set whether native code is enabled for this config.voidsetObjectSpaceEnabled(boolean newObjectSpaceEnabled) voidsetOutput(PrintStream newOutput) voidsetParserDebug(boolean parserDebug) voidsetProcessLineEnds(boolean processLineEnds) voidsetProfile(Profile newProfile) voidsetProfileMaxMethods(int profileMaxMethods) Set the maximum number of methods to consider when profiling.voidsetProfileOutput(ProfileOutput output) voidsetProfilingMode(RubyInstanceConfig.ProfilingMode profilingMode) voidsetProfilingService(String service) voidsetRecordSeparator(String recordSeparator) voidsetRunRubyInProcess(boolean flag) voidsetSafeLevel(int safeLevel) Deprecated.voidsetScriptFileName(String scriptFileName) voidsetShouldCheckSyntax(boolean shouldSetSyntax) voidsetShouldPrintProperties(boolean shouldPrintProperties) voidsetShouldPrintUsage(boolean shouldPrintUsage) voidsetShouldRunInterpreter(boolean shouldRunInterpreter) voidsetShowBytecode(boolean showBytecode) voidsetShowCopyright(boolean showCopyright) voidsetShowVersion(boolean showVersion) voidsetSiphashEnabled(boolean newSiphashEnabled) voidsetSourceEncoding(String sourceEncoding) voidsetSplit(boolean split) voidsetTraceType(TraceType traceType) voidsetUpdateNativeENVEnabled(boolean updateNativeENVEnabled) Ensure that the JVM process' native environment will be updated when ENV is modified .voidsetVerbosity(RubyInstanceConfig.Verbosity verbosity) voidsetXFlag(boolean xFlag) booleanDeprecated.booleanDeprecated.booleanDeprecated.private booleanskipToNextLine(InputStreamMarkCursor cursor) voidprivate static StringverifyHome(String home, PrintStream error)
-
Field Details
-
RUBY_SHEBANG
-
setEnvRuby
private transient boolean setEnvRuby -
extraLoadPaths
-
extraGemPaths
-
extraLoaders
-
isSecurityRestricted
private final boolean isSecurityRestricted -
xFlag
private boolean xFlagIndicates whether the script must be extracted from script source -
hasShebangLine
private boolean hasShebangLineIndicates whether the script has a shebang line or not -
input
-
output
-
error
-
profile
-
objectSpaceEnabled
private boolean objectSpaceEnabled -
siphashEnabled
private boolean siphashEnabled -
compileMode
-
currentDirectory
-
environment
Environment variables; defaults to System.getenv() in constructor -
argv
-
jitLogging
private final boolean jitLogging -
jitLoggingVerbose
private final boolean jitLoggingVerbose -
jitLogEvery
private int jitLogEvery -
jitThreshold
private int jitThreshold -
jitMax
private int jitMax -
jitMaxSize
private int jitMaxSize -
internalEncoding
-
externalEncoding
-
sourceEncoding
-
profilingMode
-
profileOutput
-
profilingService
-
loader
-
loadPaths
-
excludedMethods
-
inlineScript
-
hasInlineScript
private boolean hasInlineScript -
scriptFileName
-
requiredLibraries
-
argvGlobalsOn
private boolean argvGlobalsOn -
assumeLoop
private boolean assumeLoop -
assumePrinting
private boolean assumePrinting -
optionGlobals
-
processLineEnds
private boolean processLineEnds -
split
private boolean split -
verbosity
-
debug
private boolean debug -
showVersion
private boolean showVersion -
showBytecode
private boolean showBytecode -
showCopyright
private boolean showCopyright -
shouldRunInterpreter
private boolean shouldRunInterpreter -
shouldPrintUsage
private boolean shouldPrintUsage -
shouldPrintProperties
private boolean shouldPrintProperties -
dumpConfig
private boolean dumpConfig -
kcode
-
recordSeparator
-
shouldCheckSyntax
private boolean shouldCheckSyntax -
inputFieldSeparator
-
managementEnabled
private boolean managementEnabled -
inPlaceBackupExtension
-
parserDebug
private boolean parserDebug -
hardExit
private boolean hardExit -
disableGems
private boolean disableGems -
disableDidYouMean
private boolean disableDidYouMean -
disableRUBYOPT
private boolean disableRUBYOPT -
updateNativeENVEnabled
private boolean updateNativeENVEnabled -
kernelGsubDefined
private boolean kernelGsubDefined -
hasScriptArgv
private boolean hasScriptArgv -
frozenStringLiteral
private boolean frozenStringLiteral -
debuggingFrozenStringLiteral
private boolean debuggingFrozenStringLiteral -
interruptibleRegexps
private final boolean interruptibleRegexps -
jrubyHome
-
_nativeEnabled
private boolean _nativeEnabledWhether native code is enabled for this configuration. -
_classloaderDelegate
private boolean _classloaderDelegate -
traceType
-
backtraceMask
private boolean backtraceMask -
backtraceColor
private boolean backtraceColor -
creator
-
jitBackground
private boolean jitBackground -
loadGemfile
private boolean loadGemfile -
profileMaxMethods
private int profileMaxMethods -
allowUppercasePackageNames
private boolean allowUppercasePackageNames -
forceStdin
private boolean forceStdin -
JAVA_VERSION
public static final int JAVA_VERSIONThe version to use for generated classes. Set to current JVM version by default -
FASTOPS_COMPILE_ENABLED
public static final boolean FASTOPS_COMPILE_ENABLEDEnable fast operator compiler optimizations. Set with the jruby.compile.fastops system property. -
POOLING_ENABLED
public static final boolean POOLING_ENABLEDEnable a thread pool. Each Ruby thread will be mapped onto a thread from this pool. Set with the jruby.thread.pool.enabled system property.- See Also:
-
POOL_MAX
public static final int POOL_MAXMaximum thread pool size (integer, default Integer.MAX_VALUE). Set with the jruby.thread.pool.max system property. -
POOL_MIN
public static final int POOL_MINMinimum thread pool size (integer, default 0). Set with the jruby.thread.pool.min system property. -
POOL_TTL
public static final int POOL_TTLThread pool time-to-live in seconds. Set with the jruby.thread.pool.max system property. -
FIBER_POOL_TTL
public static final int FIBER_POOL_TTLFiber thread pool time-to-live in seconds. Set with the jruby.fiber.thread.pool.max system property. -
FULL_TRACE_ENABLED
public static boolean FULL_TRACE_ENABLEDEnable tracing of method calls. Set with the jruby.debug.fullTrace system property. -
COMPILE_EXCLUDE
Comma-separated list of methods to exclude from JIT compilation. Specify as "Module", "Module#method" or "method". Also supports excluding based on implementation_file.rb syntax. Set with the jruby.jit.exclude system property. -
NATIVE_ENABLED
public static final boolean NATIVE_ENABLEDIndicates the global default for whether native code is enabled. Default is true. This value is used to default new runtime configurations. Set with the jruby.native.enabled system property. -
CEXT_ENABLED
Deprecated.- See Also:
-
REIFY_RUBY_CLASSES
public static final boolean REIFY_RUBY_CLASSESWhether to reify (pre-compile and generate) a Java class per Ruby class. Set with the jruby.reify.classes system property. -
REIFY_LOG_ERRORS
public static final boolean REIFY_LOG_ERRORSLog errors that occur during reification. Set with the jruby.reify.logErrors system property. -
DEBUG_LOAD_SERVICE
public static final boolean DEBUG_LOAD_SERVICETurn on debugging of the load service (requires and loads). Set with the jruby.debug.loadService system property. -
DEBUG_LOAD_TIMINGS
public static final boolean DEBUG_LOAD_TIMINGSTurn on timings of the load service (requires and loads). Set with the jruby.debug.loadService.timing system property. -
DEBUG_LAUNCHING
public static final boolean DEBUG_LAUNCHINGTurn on debugging of subprocess launching. Set with the jruby.debug.launch system property. -
DEBUG_SCRIPT_RESOLUTION
public static final boolean DEBUG_SCRIPT_RESOLUTIONTurn on debugging of script resolution with "-S". Set with the jruby.debug.scriptResolution system property. -
DEBUG_PARSER
public static final boolean DEBUG_PARSER -
JUMPS_HAVE_BACKTRACE
public static final boolean JUMPS_HAVE_BACKTRACE -
NO_UNWRAP_PROCESS_STREAMS
public static final boolean NO_UNWRAP_PROCESS_STREAMS -
INTERFACES_USE_PROXY
public static final boolean INTERFACES_USE_PROXY -
SET_ACCESSIBLE
public static final boolean SET_ACCESSIBLE -
LOG_EXCEPTIONS
public static final boolean LOG_EXCEPTIONS -
LOG_BACKTRACES
public static final boolean LOG_BACKTRACES -
LOG_CALLERS
public static final boolean LOG_CALLERS -
LOG_WARNINGS
public static final boolean LOG_WARNINGS -
ERRNO_BACKTRACE
public static final boolean ERRNO_BACKTRACE -
STOPITERATION_BACKTRACE
public static final boolean STOPITERATION_BACKTRACE -
IR_DEBUG
public static boolean IR_DEBUG -
IR_DEBUG_IGV
-
IR_PROFILE
public static final boolean IR_PROFILE -
IR_COMPILER_DEBUG
public static boolean IR_COMPILER_DEBUG -
IR_WRITING
public static final boolean IR_WRITING -
IR_READING
public static final boolean IR_READING -
IR_READING_DEBUG
public static final boolean IR_READING_DEBUG -
IR_WRITING_DEBUG
public static final boolean IR_WRITING_DEBUG -
IR_VISUALIZER
public static final boolean IR_VISUALIZER -
IR_UNBOXING
public static final boolean IR_UNBOXING -
IR_COMPILER_PASSES
-
IR_JIT_PASSES
-
IR_INLINE_COMPILER_PASSES
-
RECORD_LEXICAL_HIERARCHY
public static boolean RECORD_LEXICAL_HIERARCHY -
CONSISTENT_HASHING_ENABLED
public static final boolean CONSISTENT_HASHING_ENABLEDWhether to calculate consistent hashes across JVM instances, or to ensure un-predicatable hash values using SecureRandom. Set with the jruby.consistent.hashing.enabled system property. -
loadedNativeExtensions
private static volatile boolean loadedNativeExtensions -
JIT_MAX_METHODS_LIMIT
Deprecated.The max count of active methods eligible for JIT-compilation.- See Also:
-
JIT_MAX_SIZE_LIMIT
Deprecated.The max size of JIT-compiled methods (full class size) allowed.- See Also:
-
JIT_THRESHOLD
Deprecated.The JIT threshold to the specified method invocation count.- See Also:
-
CHAINED_COMPILE_LINE_COUNT_DEFAULT
Deprecated.Default size for chained compilation.- See Also:
-
nativeEnabled
Deprecated. -
JIT_CODE_CACHE
Deprecated.- See Also:
-
NATIVE_NET_PROTOCOL
Deprecated. -
CAN_SET_ACCESSIBLE
Deprecated. -
THREADLESS_COMPILE_ENABLED
Deprecated. -
CHAINED_COMPILE_LINE_COUNT
Deprecated.- See Also:
-
PEEPHOLE_OPTZ
Deprecated.- See Also:
-
NOGUARDS_COMPILE_ENABLED
Deprecated. -
FASTEST_COMPILE_ENABLED
Deprecated.- See Also:
-
FASTSEND_COMPILE_ENABLED
Deprecated. -
FAST_MULTIPLE_ASSIGNMENT
Deprecated. -
jitDumping
Deprecated.- See Also:
-
JIT_LOADING_DEBUG
Deprecated.- See Also:
-
JIT_CACHE_ENABLED
Deprecated.- See Also:
-
runRubyInProcess
Deprecated. -
REFLECTED_HANDLES
Deprecated.- See Also:
-
threadDumpSignal
Deprecated. -
COROUTINE_FIBERS
Deprecated.- See Also:
-
globalRequireLock
Deprecated. -
USE_GENERATED_HANDLES
Deprecated.- See Also:
-
-
Constructor Details
-
RubyInstanceConfig
public RubyInstanceConfig() -
RubyInstanceConfig
public RubyInstanceConfig(boolean isSecurityRestricted) -
RubyInstanceConfig
-
RubyInstanceConfig
-
-
Method Details
-
initEnvironment
private void initEnvironment() -
createLoadService
-
processArguments
-
tryProcessArgumentsWithRubyopts
public void tryProcessArgumentsWithRubyopts() -
processArgumentsWithRubyopts
public void processArgumentsWithRubyopts() -
isShebang
- Throws:
IOException
-
skipToNextLine
- Throws:
IOException
-
eatToShebang
-
parseShebangOptions
The intent here is to gather up any options that might have been specified in the shebang line and return them so they can be merged into the ones specified on the command-line. This is kind of a hopeless task because it's impossible to figure out where the command invocation stops and the parameters start. We try to work with the common scenarios where /usr/bin/env is used to invoke the JRuby shell script, and skip any parameters it might have. Then we look for the interpreter invocation and assume that the binary will have the word "ruby" in the name. This is error prone but should cover more cases than the previous code. -
isRubyShebangLine
-
calculateJRubyHome
-
verifyHome
-
isUpdateNativeENVEnabled
public boolean isUpdateNativeENVEnabled()Indicates whether the JVM process' native environment will be updated when ENV[...] is set from Ruby. -
setUpdateNativeENVEnabled
public void setUpdateNativeENVEnabled(boolean updateNativeENVEnabled) Ensure that the JVM process' native environment will be updated when ENV is modified . -
inlineScript
public byte[] inlineScript() -
getScriptSource
-
findScript
- Throws:
IOException
-
displayedFileName
-
hasLoadedNativeExtensions
public static boolean hasLoadedNativeExtensions() -
setLoadedNativeExtensions
public static void setLoadedNativeExtensions(boolean loadedNativeExtensions) -
getLoadServiceCreator
-
setLoadServiceCreator
-
getJRubyHome
-
setJRubyHome
-
getCompileMode
-
setCompileMode
-
isJitLogging
public boolean isJitLogging()- See Also:
-
isJitLoggingVerbose
public boolean isJitLoggingVerbose()- See Also:
-
getJitLogEvery
public int getJitLogEvery()- See Also:
-
setJitLogEvery
public void setJitLogEvery(int jitLogEvery) - See Also:
-
getJitThreshold
public int getJitThreshold()- See Also:
-
setJitThreshold
public void setJitThreshold(int jitThreshold) - See Also:
-
getJitMax
public int getJitMax()- See Also:
-
setJitMax
public void setJitMax(int jitMax) - See Also:
-
getJitMaxSize
public int getJitMaxSize()- See Also:
-
setJitMaxSize
public void setJitMaxSize(int jitMaxSize) - See Also:
-
isJitEnabled
public boolean isJitEnabled()- Returns:
- true if JIT compilation is enabled
-
isRunRubyInProcess
public boolean isRunRubyInProcess()- See Also:
-
setRunRubyInProcess
public void setRunRubyInProcess(boolean flag) - See Also:
-
setInput
-
getInput
-
setOutput
-
getOutput
-
setError
-
getError
-
setCurrentDirectory
-
getCurrentDirectory
-
setProfile
-
getProfile
-
setObjectSpaceEnabled
public void setObjectSpaceEnabled(boolean newObjectSpaceEnabled) - See Also:
-
isObjectSpaceEnabled
public boolean isObjectSpaceEnabled()- See Also:
-
setSiphashEnabled
public void setSiphashEnabled(boolean newSiphashEnabled) - See Also:
-
isSiphashEnabled
public boolean isSiphashEnabled()- See Also:
-
setEnvironment
-
getEnvironment
-
resetEnvRuby
private void resetEnvRuby() -
getLoader
-
setLoader
-
getExtraLoadPaths
-
getExtraGemPaths
-
getExtraLoaders
-
addLoader
adds a given ClassLoader to jruby. i.e. adds the root of the classloader to the LOAD_PATH so embedded ruby scripts can be found. dito for embedded gems. since classloaders do not provide directory information (some do and some do not) the source of the classloader needs to have a '.jrubydir' in each with the list of files and directories of the same directory. (see jruby-stdlib.jar or jruby-complete.jar inside META-INF/jruby.home for examples). these files can be generated byjruby -S generate_dir_info {path/to/ruby/files}- Parameters:
loader-
-
addLoader
adds a given "bundle" to jruby. an OSGi bundle and a classloader both have common set of method but do not share a common interface. for adding a bundle or classloader to jruby is done via the base URL of the classloader/bundle. all we need is the 'getResource'/'getResources' method to do so.- Parameters:
bundle-
-
getArgv
-
setArgv
-
getInlineScript
-
setHasInlineScript
public void setHasInlineScript(boolean hasInlineScript) -
hasInlineScript
public boolean hasInlineScript() -
getRequiredLibraries
-
getLoadPaths
-
setLoadPaths
-
setShouldPrintUsage
public void setShouldPrintUsage(boolean shouldPrintUsage) - See Also:
-
getShouldPrintUsage
public boolean getShouldPrintUsage()- See Also:
-
setShouldPrintProperties
public void setShouldPrintProperties(boolean shouldPrintProperties) - See Also:
-
getShouldPrintProperties
public boolean getShouldPrintProperties()- See Also:
-
isInlineScript
public boolean isInlineScript() -
isForceStdin
public boolean isForceStdin()True if we are only using source from stdin and not from a -e or file argument. -
setForceStdin
public void setForceStdin(boolean forceStdin) Set whether we should only look at stdin for source. -
setScriptFileName
-
getScriptFileName
-
setAssumeLoop
public void setAssumeLoop(boolean assumeLoop) - See Also:
-
isAssumeLoop
public boolean isAssumeLoop()- See Also:
-
setAssumePrinting
public void setAssumePrinting(boolean assumePrinting) - See Also:
-
isAssumePrinting
public boolean isAssumePrinting()- See Also:
-
setProcessLineEnds
public void setProcessLineEnds(boolean processLineEnds) - See Also:
-
isProcessLineEnds
public boolean isProcessLineEnds()- See Also:
-
setSplit
public void setSplit(boolean split) - See Also:
-
isSplit
public boolean isSplit()- See Also:
-
getVerbosity
- See Also:
-
setVerbosity
- See Also:
-
isVerbose
public boolean isVerbose()- See Also:
-
isDebug
public boolean isDebug()- See Also:
-
setDebug
public void setDebug(boolean debug) - See Also:
-
isParserDebug
public boolean isParserDebug()- See Also:
-
setParserDebug
public void setParserDebug(boolean parserDebug) - See Also:
-
getParserDebug
public boolean getParserDebug()- See Also:
-
setShowVersion
public void setShowVersion(boolean showVersion) - See Also:
-
isShowVersion
public boolean isShowVersion()- See Also:
-
setShowBytecode
public void setShowBytecode(boolean showBytecode) - See Also:
-
isShowBytecode
public boolean isShowBytecode()- See Also:
-
setShowCopyright
public void setShowCopyright(boolean showCopyright) - See Also:
-
isShowCopyright
public boolean isShowCopyright()- See Also:
-
setShouldRunInterpreter
public void setShouldRunInterpreter(boolean shouldRunInterpreter) -
getShouldRunInterpreter
public boolean getShouldRunInterpreter() -
setShouldCheckSyntax
public void setShouldCheckSyntax(boolean shouldSetSyntax) - See Also:
-
getShouldCheckSyntax
public boolean getShouldCheckSyntax()- See Also:
-
setInputFieldSeparator
- See Also:
-
getInputFieldSeparator
- See Also:
-
getKCode
- See Also:
-
setKCode
- See Also:
-
setInternalEncoding
- See Also:
-
getInternalEncoding
- See Also:
-
setExternalEncoding
- See Also:
-
getExternalEncoding
- See Also:
-
setSourceEncoding
- See Also:
-
getSourceEncoding
- See Also:
-
setRecordSeparator
- See Also:
-
getRecordSeparator
- See Also:
-
getSafeLevel
public int getSafeLevel() -
setInPlaceBackupExtension
- See Also:
-
getInPlaceBackupExtension
- See Also:
-
getOptionGlobals
-
isManagementEnabled
public boolean isManagementEnabled() -
getExcludedMethods
-
isArgvGlobalsOn
public boolean isArgvGlobalsOn() -
setArgvGlobalsOn
public void setArgvGlobalsOn(boolean argvGlobalsOn) -
isHardExit
public boolean isHardExit() -
setHardExit
public void setHardExit(boolean hardExit) -
isProfiling
public boolean isProfiling()- See Also:
-
isProfilingEntireRun
public boolean isProfilingEntireRun()- See Also:
-
setProfilingMode
- See Also:
-
getProfilingMode
- See Also:
-
setProfileOutput
-
getProfileOutput
-
hasShebangLine
public boolean hasShebangLine() -
setHasShebangLine
public void setHasShebangLine(boolean hasShebangLine) -
isDisableGems
public boolean isDisableGems()- See Also:
-
isDisableDidYouMean
public boolean isDisableDidYouMean()- See Also:
-
setDisableRUBYOPT
public void setDisableRUBYOPT(boolean dr) - See Also:
-
setDisableGems
public void setDisableGems(boolean dg) - See Also:
-
setDisableDidYouMean
public void setDisableDidYouMean(boolean ddym) - See Also:
-
getTraceType
- See Also:
-
setTraceType
- See Also:
-
setHasScriptArgv
public void setHasScriptArgv(boolean argvRemains) -
getHasScriptArgv
public boolean getHasScriptArgv() -
getBacktraceMask
public boolean getBacktraceMask()Whether to mask .java lines in the Ruby backtrace, as MRI does for C calls.- Returns:
- true if masking; false otherwise
- See Also:
-
setBacktraceMask
public void setBacktraceMask(boolean backtraceMask) Set whether to mask .java lines in the Ruby backtrace.- Parameters:
backtraceMask- true to mask; false otherwise- See Also:
-
setNativeEnabled
public void setNativeEnabled(boolean b) Set whether native code is enabled for this config.- Parameters:
b- new value indicating whether native code is enabled- See Also:
-
isNativeEnabled
public boolean isNativeEnabled()Get whether native code is enabled for this config.- Returns:
- true if native code is enabled; false otherwise.
- See Also:
-
setClassloaderDelegate
public void setClassloaderDelegate(boolean b) Set whether to use the self-first jruby classloader.- Parameters:
b- new value indicating whether self-first classloader is used- See Also:
-
isClassloaderDelegate
public boolean isClassloaderDelegate()Get whether to use the self-first jruby classloader.- Returns:
- true if self-first classloader is used; false otherwise.
- See Also:
-
setXFlag
public void setXFlag(boolean xFlag) - See Also:
-
isXFlag
public boolean isXFlag()- See Also:
-
getBacktraceColor
public boolean getBacktraceColor()True if colorized backtraces are enabled. False otherwise.- See Also:
-
setBacktraceColor
public void setBacktraceColor(boolean backtraceColor) Set to true to enable colorized backtraces.- See Also:
-
setJitBackground
public void setJitBackground(boolean jitBackground) Set whether the JIT compiler should run in a background thread (Executor-based).- Parameters:
jitBackground- whether to run the JIT compiler in a background thread- See Also:
-
getJitBackground
public boolean getJitBackground()Get whether the JIT compiler will run in a background thread.- Returns:
- whether the JIT compiler will run in a background thread
- See Also:
-
setLoadGemfile
public void setLoadGemfile(boolean loadGemfile) Set whether to load and setup bundler on startup.- See Also:
-
getLoadGemfile
public boolean getLoadGemfile()Whether to load and setup bundler on startup.- See Also:
-
setProfileMaxMethods
public void setProfileMaxMethods(int profileMaxMethods) Set the maximum number of methods to consider when profiling.- See Also:
-
getProfileMaxMethods
public int getProfileMaxMethods()Get the maximum number of methods to consider when profiling.- See Also:
-
setKernelGsubDefined
public void setKernelGsubDefined(boolean setDefineKernelGsub) Set whether Kernel#gsub should be defined -
getKernelGsubDefined
public boolean getKernelGsubDefined()Get Kernel#gsub is defined or not -
getAllowUppercasePackageNames
public boolean getAllowUppercasePackageNames()get whether uppercase package names will be honored -
setAllowUppercasePackageNames
public void setAllowUppercasePackageNames(boolean allow) set whether uppercase package names will be honored -
getProfilingService
-
setProfilingService
-
isFrozenStringLiteral
public boolean isFrozenStringLiteral() -
setFrozenStringLiteral
public void setFrozenStringLiteral(boolean frozenStringLiteral) -
isDebuggingFrozenStringLiteral
public boolean isDebuggingFrozenStringLiteral() -
setDebuggingFrozenStringLiteral
public void setDebuggingFrozenStringLiteral(boolean debuggingFrozenStringLiteral) -
isInterruptibleRegexps
public boolean isInterruptibleRegexps() -
defaultClassLoader
-
getCurrentThreadClassLoader
-
initJavaBytecodeVersion
private static int initJavaBytecodeVersion() -
setSafeLevel
Deprecated. -
getInPlaceBackupExtention
Deprecated. -
getBasicUsageHelp
Deprecated. -
getExtendedHelp
Deprecated. -
getPropertyHelp
Deprecated. -
getVersionString
Deprecated. -
getCopyrightString
Deprecated. -
requiredLibraries
Deprecated. -
loadPaths
Deprecated. -
shouldPrintUsage
Deprecated. -
shouldPrintProperties
Deprecated. -
getVerbose
Deprecated. -
shouldRunInterpreter
Deprecated. -
isShouldRunInterpreter
Deprecated. -
isxFlag
Deprecated. -
isSamplingEnabled
Deprecated. -
setBenchmarking
Deprecated. -
isBenchmarking
Deprecated. -
setCextEnabled
Deprecated. -
isCextEnabled
Deprecated. -
getIPv4Preferred
Deprecated. -
getCompatVersion
Deprecated. -
setCompatVersion
Deprecated. -
isJitDumping
Deprecated. -
getThreadDumpSignal
Deprecated. -
isGlobalRequireLock
Deprecated. -
setGlobalRequireLock
Deprecated.
-