Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
BEGIN LICENSE BLOCK ***** Version: CPL 1.0/GPL 2.0/LGPL 2.1 The contents of this file are subject to the Common Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.eclipse.org/legal/cpl-v10.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyright (C) 2007-2011 Nick Sieger <nicksieger@gmail.com> Copyright (C) 2009 Joseph LaFata <joe@quibb.org> Alternatively, the contents of this file may be used under the terms of either of the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the CPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the CPL, the GPL or the LGPL. END LICENSE BLOCK ***
  
  package org.jruby;
  
  import java.io.File;
  import java.net.URL;
  import java.util.Arrays;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
  
  import  org.objectweb.asm.Opcodes;

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.
  
  public class RubyInstanceConfig {
      public RubyInstanceConfig() {
           = Ruby.isSecurityRestricted() ? "/" : JRubyFile.getFileProperty("user.dir");
           = SafePropertyAccessor.getBoolean("jruby.sampling.enabled"false);
  
          String compatString = ..load();
           = CompatVersion.getVersionFromString(compatString);
          if ( == null) {
              .println("Compatibility version `" + compatString + "' invalid; use 1.8, 1.9, or 2.0. Using 1.8.");
               = .;
          }
  
          if (Ruby.isSecurityRestricted()) {
               = .;
               = false;
               = false;
              = false;
              = 0;
              = -1;
              = 0;
              = -1;
              = false;
         } else {
             if ( != null) {
                 String[] elements = .split(",");
                 .addAll(Arrays.asList(elements));
             }
             
              = ..load();
              = ..load();
             
             String jitModeProperty = ..load();
 
             if (jitModeProperty.equals("OFF")) {
                  = .;
             } else if (jitModeProperty.equals("OFFIR")) {
                  = .;
             } else if (jitModeProperty.equals("JIT")) {
                  = .;
             } else if (jitModeProperty.equals("FORCE")) {
                  = .;
             } else {
                 .print(. + " property must be OFF, JIT, FORCE, or unset; defaulting to JIT");
                  = .;
             }
             
              = ..load();
              = ..load();
              = ..load();
              = ..load();
              = ..load();
              = ..load();
              = ..load();
         }
 
         // default ClassCache using jitMax as a soft upper bound
          = new ClassCache<Script>();
 
         try {
              = System.getenv();
         } catch (SecurityException se) {
              = new HashMap();
         }
     }
     
     public RubyInstanceConfig(RubyInstanceConfig parentConfig) {
          = parentConfig.getCurrentDirectory();
          = parentConfig.samplingEnabled;
          = parentConfig.compatVersion;
          = parentConfig.getCompileMode();
          = parentConfig.jitLogging;
          = parentConfig.jitDumping;
          = parentConfig.jitLoggingVerbose;
          = parentConfig.jitLogEvery;
          = parentConfig.jitThreshold;
          = parentConfig.jitMax;
          = parentConfig.jitMaxSize;
          = parentConfig.managementEnabled;
          = parentConfig.runRubyInProcess;
          = parentConfig.excludedMethods;
          = parentConfig.threadDumpSignal;
          = parentConfig.updateNativeENVEnabled;
         
          = new ClassCache<Script>();
 
         try {
              = System.getenv();
         } catch (SecurityException se) {
              = new HashMap();
         }
     }
 
     public LoadService createLoadService(Ruby runtime) {
         return .create(runtime);
     }
 
     @Deprecated
     public String getBasicUsageHelp() {
         return OutputStrings.getBasicUsageHelp();
     }
 
     @Deprecated
     public String getExtendedHelp() {
         return OutputStrings.getExtendedHelp();
     }
 
     @Deprecated
     public String getPropertyHelp() {
         return OutputStrings.getPropertyHelp();
     }
 
     @Deprecated
     public String getVersionString() {
         return OutputStrings.getVersionString();
     }
 
     @Deprecated
     public String getCopyrightString() {
         return OutputStrings.getCopyrightString();
     }
 
     public void processArguments(String[] arguments) {
         new ArgumentProcessor(argumentsthis).processArguments();
     }
 
     public void tryProcessArgumentsWithRubyopts() {
         try {
             // environment defaults to System.getenv normally
             Object rubyoptObj = .get("RUBYOPT");
             String rubyopt = rubyoptObj == null ? null : rubyoptObj.toString();
             
             if (rubyopt == null || "".equals(rubyopt)) return;
 
             if (rubyopt.split("\\s").length != 0) {
                 String[] rubyoptArgs = rubyopt.split("\\s+");
                 new ArgumentProcessor(rubyoptArgsfalsetruethis).processArguments();
             }
         } catch (SecurityException se) {
             // ignore and do nothing
         }
     }
     
     // This method does not work like previous version in verifying it is
     // a Ruby shebang line.  Looking for ruby before \n is possible to add,
     // but I wanted to keep this short.
     private boolean isShebang(InputStreamMarkCursor cursorthrows IOException {
         if (cursor.read() == '#') {
             int c = cursor.read();
             if (c == '!') {
                 cursor.endPoint(-2);
                 return true;
             } else if (c == '\n') {
                 cursor.rewind();
             }
         } else {
             cursor.rewind();
         }
         
         return false;
     }
     
     private boolean skipToNextLine(InputStreamMarkCursor cursorthrows IOException {
         int c = cursor.read();
         do {
             if (c == '\n'return true;
         } while ((c = cursor.read()) != -1);
         
         return false;
     }
 
     private void eatToShebang(InputStream in) {
         InputStreamMarkCursor cursor = new InputStreamMarkCursor(in, 8192);
         try {
             do {
                 if (isShebang(cursor)) break;
             } while (skipToNextLine(cursor));
         } catch (IOException e) {
         } finally {
             try { cursor.finish(); } catch (IOException e) {}
         }
     }
    
    
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.
 
     public String[] parseShebangOptions(InputStream in) {
         BufferedReader reader = null;
         String[] result = new String[0];
         if (in == nullreturn result;
         
         if (isXFlag()) eatToShebang(in);
         
         try {
             InputStreamMarkCursor cursor = new InputStreamMarkCursor(in, 8192);
             try {
                 if (!isShebang(cursor)) return result;
             } finally {
                 cursor.finish();
             }
 
             in.mark(8192);
             reader = new BufferedReader(new InputStreamReader(in"iso-8859-1"), 8192);
             String firstLine = reader.readLine();
 
             boolean usesEnv = false;
             if (firstLine.length() > 2 && firstLine.charAt(0) == '#' && firstLine.charAt(1) == '!') {
                 String[] options = firstLine.substring(2).split("\\s+");
                 int i;
                 for (i = 0; i < options.lengthi++) {
                     // Skip /usr/bin/env if it's first
                     if (i == 0 && options[i].endsWith("/env")) {
                         usesEnv = true;
                         continue;
                     }
                     // Skip any assignments if /usr/bin/env is in play
                     if (usesEnv && options[i].indexOf('=') > 0) continue;
 
                     // Skip any commandline args if /usr/bin/env is in play
                     if (usesEnv && options[i].startsWith("-")) continue;
 
                     String basename = (new File(options[i])).getName();
                     if (basename.indexOf("ruby") > 0) break;
                 }
                 setHasShebangLine(true);
                 System.arraycopy(optionsiresult, 0, options.length - i);
             } else {
                 // No shebang line found
                 setHasShebangLine(false);
             }
         } catch (Exception ex) {
             // ignore error
         } finally {
             try {
                 in.reset();
             } catch (IOException ex) {}
         }
         return result;
     }
     
     private static final Pattern RUBY_SHEBANG = Pattern.compile("#!.*ruby.*");
 
     protected static boolean isRubyShebangLine(String line) {
         return .matcher(line).matches();
     }
     
     private String calculateJRubyHome() {
         String newJRubyHome = null;
         
         // try the normal property first
         if (!Ruby.isSecurityRestricted()) {
             newJRubyHome = SafePropertyAccessor.getProperty("jruby.home");
         }
 
         if (newJRubyHome != null) {
             // verify it if it's there
             newJRubyHome = verifyHome(newJRubyHome);
         } else {
             try {
                 newJRubyHome = SystemPropertyCatcher.findFromJar(this);
             } catch (Exception e) {}
 
             if (newJRubyHome != null) {
                 // verify it if it's there
                 newJRubyHome = verifyHome(newJRubyHome);
             } else {
                 // otherwise fall back on system temp location
                 newJRubyHome = SafePropertyAccessor.getProperty("java.io.tmpdir");
             }
         }
         
         return newJRubyHome;
     }
 
     // We require the home directory to be absolute
     private static String verifyHome(String homePrintStream error) {
         if (home.equals(".")) {
             home = SafePropertyAccessor.getProperty("user.dir");
         }
         if (home.startsWith("cp:")) {
             home = home.substring(3);
         } else if (!home.startsWith("file:") && !home.startsWith("classpath:")) {
             NormalizedFile f = new NormalizedFile(home);
             if (!f.isAbsolute()) {
                 home = f.getAbsolutePath();
             }
             if (!f.exists()) {
                 error.println("Warning: JRuby home \"" + f + "\" does not exist, using " + SafePropertyAccessor.getProperty("java.io.tmpdir"));
                 return System.getProperty("java.io.tmpdir");
             }
         }
         return home;
     }

    
Indicates whether the JVM process' native environment will be updated when ENV[...] is set from Ruby.
 
     public boolean isUpdateNativeENVEnabled() {
         return ;
     }

    
Ensure that the JVM process' native environment will be updated when ENV is modified
 
     public void setUpdateNativeENVEnabled(boolean updateNativeENVEnabled) {
         this. = updateNativeENVEnabled;
     }
 
     public byte[] inlineScript() {
         return .toString().getBytes();
     }
 
     public InputStream getScriptSource() {
         try {
             // KCode.NONE is used because KCODE does not affect parse in Ruby 1.8
             // if Ruby 2.0 encoding pragmas are implemented, this will need to change
             if () {
                 return new ByteArrayInputStream(inlineScript());
             } else if (isSourceFromStdin()) {
                 // can't use -v and stdin
                 if (isShowVersion()) {
                     return null;
                 }
                 return getInput();
             } else {
                 String script = getScriptFileName();
                 InputStream stream = null;
                 if (script.startsWith("file:") && script.indexOf(".jar!/") != -1) {
                     stream = new URL("jar:" + script).openStream();
                 } else if (script.startsWith("classpath:")) {
                     stream = Ruby.getClassLoader().getResourceAsStream(script.substring("classpath:".length()));
                 } else {
                     File file = JRubyFile.create(getCurrentDirectory(), getScriptFileName());
                     if (isXFlag()) {
                         // search for a shebang line and
                         // return the script between shebang and __END__ or CTRL-Z (0x1A)
                         return findScript(file);
                     }
                     stream = new FileInputStream(file);
                 }
 
                 return new BufferedInputStream(stream, 8192);
             }
         } catch (IOException e) {
             // We haven't found any file directly on the file system,
             // now check for files inside the JARs.
             InputStream is = getJarScriptSource();
             if (is != null) {
                 return new BufferedInputStream(is, 8129);
             }
             throw new MainExitException(1, "Error opening script file: " + e.getMessage());
         }
     }
 
     private static InputStream findScript(File filethrows IOException {
         StringBuffer buf = new StringBuffer();
         BufferedReader br = new BufferedReader(new FileReader(file));
         String currentLine = br.readLine();
         while (currentLine != null && !isRubyShebangLine(currentLine)) {
             currentLine = br.readLine();
         }
 
         buf.append(currentLine);
         buf.append("\n");
 
         do {
             currentLine = br.readLine();
             if (currentLine != null) {
             buf.append(currentLine);
             buf.append("\n");
             }
         } while (!(currentLine == null || currentLine.contains("__END__") || currentLine.contains("\026")));
         return new BufferedInputStream(new ByteArrayInputStream(buf.toString().getBytes()), 8192);
     }
 
     private static InputStream getJarScriptSource(String scriptFileName) {
         boolean looksLikeJarURL = scriptFileName.startsWith("file:") && scriptFileName.indexOf("!/") != -1;
         if (!looksLikeJarURL) {
             return null;
         }
 
         String before = scriptFileName.substring("file:".length(), scriptFileName.indexOf("!/"));
         String after =  scriptFileName.substring(scriptFileName.indexOf("!/") + 2);
 
         try {
             JarFile jFile = new JarFile(before);
             JarEntry entry = jFile.getJarEntry(after);
 
             if (entry != null && !entry.isDirectory()) {
                 return jFile.getInputStream(entry);
             }
         } catch (IOException ignored) {
         }
         return null;
     }
 
     public String displayedFileName() {
         if () {
             if ( != null) {
                 return ;
             } else {
                 return "-e";
             }
         } else if (isSourceFromStdin()) {
             return "-";
         } else {
             return getScriptFileName();
         }
     }
 
     public ASTCompiler newCompiler() {
         if (getCompatVersion() == .) {
             return new ASTCompiler();
         } else {
             return new ASTCompiler19();
         }
     }
     
     ////////////////////////////////////////////////////////////////////////////
     // Static utilities and global state management methods.
     ////////////////////////////////////////////////////////////////////////////
     
     public static boolean hasLoadedNativeExtensions() {
         return ;
     }
     
     public static void setLoadedNativeExtensions(boolean loadedNativeExtensions) {
         . = loadedNativeExtensions;
     }
     
     ////////////////////////////////////////////////////////////////////////////
     // Getters and setters for config settings.
     ////////////////////////////////////////////////////////////////////////////
 
         return ;
     }
 
     public void setLoadServiceCreator(LoadServiceCreator creator) {
         this. = creator;
     }
 
     public String getJRubyHome() {
         if ( == null) {
              = calculateJRubyHome();
         }
         return ;
     }
 
     public void setJRubyHome(String home) {
          = verifyHome(home);
     }
 
     public CompileMode getCompileMode() {
         return ;
     }
 
     public void setCompileMode(CompileMode compileMode) {
         this. = compileMode;
     }
 
     public boolean isJitLogging() {
         return ;
     }
 
     public boolean isJitDumping() {
         return ;
     }
 
     public boolean isJitLoggingVerbose() {
         return ;
     }
 
     public int getJitLogEvery() {
         return ;
     }
 
     public void setJitLogEvery(int jitLogEvery) {
         this. = jitLogEvery;
     }
 
     public boolean isSamplingEnabled() {
         return ;
     }
 
     public int getJitThreshold() {
         return ;
     }
 
     public void setJitThreshold(int jitThreshold) {
         this. = jitThreshold;
     }
 
     public int getJitMax() {
         return ;
     }
 
     public void setJitMax(int jitMax) {
         this. = jitMax;
     }
 
     public int getJitMaxSize() {
         return ;
     }
 
     public void setJitMaxSize(int jitMaxSize) {
         this. = jitMaxSize;
     }
 
     public boolean isRunRubyInProcess() {
         return ;
     }
 
     public void setRunRubyInProcess(boolean flag) {
         this. = flag;
     }
 
     public void setInput(InputStream newInput) {
          = newInput;
     }
 
     public InputStream getInput() {
         return ;
     }
 
     public CompatVersion getCompatVersion() {
         return ;
     }
 
     public void setCompatVersion(CompatVersion compatVersion) {
         if (compatVersion == nullcompatVersion = .;
 
         this. = compatVersion;
     }
 
     public void setOutput(PrintStream newOutput) {
          = newOutput;
     }
 
     public PrintStream getOutput() {
         return ;
     }
 
     public void setError(PrintStream newError) {
          = newError;
     }
 
     public PrintStream getError() {
         return ;
     }
 
     public void setCurrentDirectory(String newCurrentDirectory) {
          = newCurrentDirectory;
     }
 
     public String getCurrentDirectory() {
         return ;
     }
 
     public void setProfile(Profile newProfile) {
          = newProfile;
     }
 
     public Profile getProfile() {
         return ;
     }
 
     public void setObjectSpaceEnabled(boolean newObjectSpaceEnabled) {
          = newObjectSpaceEnabled;
     }
 
     public boolean isObjectSpaceEnabled() {
         return ;
     }
     
     public void setSiphashEnabled(boolean newSiphashEnabled) {
          = newSiphashEnabled;
     }
     
     public boolean isSiphashEnabled() {
         return ;
     }
 
     public void setEnvironment(Map newEnvironment) {
         if (newEnvironment == nullnewEnvironment = new HashMap();
          = newEnvironment;
     }
 
     public Map getEnvironment() {
         return ;
     }
 
     public ClassLoader getLoader() {
         return ;
     }
 
     public void setLoader(ClassLoader loader) {
         // Setting the loader needs to reset the class cache
         if(this. != loader) {
             this. = new ClassCache<Script>(loaderthis..getMax());
         }
         this. = loader;
     }
 
     public String[] getArgv() {
         return ;
     }
 
     public void setArgv(String[] argv) {
         this. = argv;
     }
     
     public StringBuffer getInlineScript() {
         return ;
     }
     
     public void setHasInlineScript(boolean hasInlineScript) {
         this. = hasInlineScript;
     }
     
     public boolean hasInlineScript() {
         return ;
     }
     
     public Collection<StringgetRequiredLibraries() {
         return ;
     }
 
     @Deprecated
     public Collection<StringrequiredLibraries() {
         return ;
     }
     
     public List<StringgetLoadPaths() {
         return ;
     }
 
     @Deprecated
     public List<StringloadPaths() {
         return ;
     }
 
     public void setLoadPaths(List<StringloadPaths) {
         this. = loadPaths;
     }
     
     public void setShouldPrintUsage(boolean shouldPrintUsage) {
         this. = shouldPrintUsage;
     }
     
     public boolean getShouldPrintUsage() {
         return ;
     }
 
     @Deprecated
     public boolean shouldPrintUsage() {
         return ;
     }
     
     public void setShouldPrintProperties(boolean shouldPrintProperties) {
         this. = shouldPrintProperties;
     }
     
     public boolean getShouldPrintProperties() {
         return ;
     }
 
     @Deprecated
     public boolean shouldPrintProperties() {
         return ;
     }
 
     public boolean isInlineScript() {
         return ;
     }
 
     private boolean isSourceFromStdin() {
         return getScriptFileName() == null;
     }
 
     public void setScriptFileName(String scriptFileName) {
         this. = scriptFileName;
     }
 
     public String getScriptFileName() {
         return ;
     }
     
     public void setBenchmarking(boolean benchmarking) {
         this. = benchmarking;
     }
 
     public boolean isBenchmarking() {
         return ;
     }
     
     public void setAssumeLoop(boolean assumeLoop) {
         this. = assumeLoop;
     }
 
     public boolean isAssumeLoop() {
         return ;
     }
     
     public void setAssumePrinting(boolean assumePrinting) {
         this. = assumePrinting;
     }
 
     public boolean isAssumePrinting() {
         return ;
     }
     
     public void setProcessLineEnds(boolean processLineEnds) {
         this. = processLineEnds;
     }
 
     public boolean isProcessLineEnds() {
         return ;
     }
     
     public void setSplit(boolean split) {
         this. = split;
     }
 
     public boolean isSplit() {
         return ;
     }
     
     public Verbosity getVerbosity() {
         return ;
     }
     
     public void setVerbosity(Verbosity verbosity) {
         this. = verbosity;
     }
 
     public boolean isVerbose() {
         return  == .;
     }
 
     @Deprecated
     public Boolean getVerbose() {
         return isVerbose();
     }
 
     public boolean isDebug() {
         return ;
     }
 
     public void setDebug(boolean debug) {
         this. = debug;
     }
 
     public boolean isParserDebug() {
         return ;
     }
 
     public boolean isShowVersion() {
         return ;
     }
     
     public boolean isShowBytecode() {
         return ;
     }
 
     public boolean isShowCopyright() {
         return ;
     }
 
     public void setShowVersion(boolean showVersion) {
         this. = showVersion;
     }
     
     public void setShowBytecode(boolean showBytecode) {
         this. = showBytecode;
     }
 
     public void setShowCopyright(boolean showCopyright) {
         this. = showCopyright;
     }
     
     public void setShouldRunInterpreter(boolean shouldRunInterpreter) {
         this. = shouldRunInterpreter;
     }
     
     public boolean getShouldRunInterpreter() {
         return ;
     }
 
     @Deprecated
     public boolean shouldRunInterpreter() {
         return isShouldRunInterpreter();
     }
 
     @Deprecated
     public boolean isShouldRunInterpreter() {
         return ;
     }
     
     public void setShouldCheckSyntax(boolean shouldSetSyntax) {
         this. = shouldSetSyntax;
     }
 
     public boolean getShouldCheckSyntax() {
         return ;
     }
     
     public void setInputFieldSeparator(String inputFieldSeparator) {
         this. = inputFieldSeparator;
     }
 
     public String getInputFieldSeparator() {
         return ;
     }
 
     public KCode getKCode() {
         return ;
     }
 
     public void setKCode(KCode kcode) {
         this. = kcode;
     }
     
     public void setInternalEncoding(String internalEncoding) {
         this. = internalEncoding;
     }
 
     public String getInternalEncoding() {
         return ;
     }
     
     public void setExternalEncoding(String externalEncoding) {
         this. = externalEncoding;
     }
 
     public String getExternalEncoding() {
         return ;
     }
     
     public void setRecordSeparator(String recordSeparator) {
         this. = recordSeparator;
     }
 
     public String getRecordSeparator() {
         return ;
     }
 
     public int getSafeLevel() {
         return 0;
     }
 
     public ClassCache getClassCache() {
         return ;
     }
     
     public void setInPlaceBackupExtension(String inPlaceBackupExtension) {
         this. = inPlaceBackupExtension;
     }
 
     public String getInPlaceBackupExtension() {
         return ;
     }
 
     public void setClassCache(ClassCache classCache) {
         this. = classCache;
     }
 
     public Map getOptionGlobals() {
         return ;
     }
     
     public boolean isManagementEnabled() {
         return ;
     }
     
     public Set getExcludedMethods() {
         return ;
     }
     
     public void setParserDebug(boolean parserDebug) {
         this. = parserDebug;
     }
     
     public boolean getParserDebug() {
         return ;
     }
 
     public boolean isArgvGlobalsOn() {
         return ;
     }
 
     public void setArgvGlobalsOn(boolean argvGlobalsOn) {
         this. = argvGlobalsOn;
     }
 
     public String getThreadDumpSignal() {
         return ;
     }
 
     public boolean isHardExit() {
         return ;
     }
 
     public void setHardExit(boolean hardExit) {
         this. = hardExit;
     }
 
     public boolean isProfiling() {
         return  != .;
    }
    
    public boolean isProfilingEntireRun() {
        return  != . &&  != .;
    }
    
    public void setProfilingMode(ProfilingMode profilingMode) {
        this. = profilingMode;
    }
    public ProfilingMode getProfilingMode() {
        return ;
    }
    public void setProfileOutput(ProfileOutput output) {
        this. = output;
    }
    public ProfileOutput getProfileOutput() {
        return ;
    }
    public boolean hasShebangLine() {
        return ;
    }
    public void setHasShebangLine(boolean hasShebangLine) {
        this. = hasShebangLine;
    }
    public boolean isDisableGems() {
        return ;
    }
    public void setDisableGems(boolean dg) {
        this. = dg;
    }
    public TraceType getTraceType() {
        return ;
    }
    public void setTraceType(TraceType traceType) {
        this. = traceType;
    }

    
Whether to mask .java lines in the Ruby backtrace, as MRI does for C calls.

Returns:
true if masking; false otherwise
    public boolean getBacktraceMask() {
        return ;
    }

    
Set whether to mask .java lines in the Ruby backtrace.

Parameters:
backtraceMask true to mask; false otherwise
    public void setBacktraceMask(boolean backtraceMask) {
        this. = backtraceMask;
    }
    
    
Set whether native code is enabled for this config. Disabling it also disables C extensions (@see RubyInstanceConfig#setCextEnabled).

Parameters:
b new value indicating whether native code is enabled
    public void setNativeEnabled(boolean b) {
         = false;
    }
    
    
Get whether native code is enabled for this config.

Returns:
true if native code is enabled; false otherwise.
    public boolean isNativeEnabled() {
        return ;
    }
    
    
Set whether C extensions are enabled for this config.

Parameters:
b new value indicating whether native code is enabled
    public void setCextEnabled(boolean b) {
         = b;
    }
    
    
Get whether C extensions are enabled for this config.

Returns:
true if C extensions are enabled; false otherwise.
    public boolean isCextEnabled() {
        return ;
    }
    
    public void setXFlag(boolean xFlag) {
        this. = xFlag;
    }
    public boolean isXFlag() {
        return ;
    }
    
    public boolean isxFlag() {
        return ;
    }
    
    
True if colorized backtraces are enabled. False otherwise.
    public boolean getBacktraceColor() {
        return ;
    }
    
    
Set to true to enable colorized backtraces.
    public void setBacktraceColor(boolean backtraceColor) {
        this. = backtraceColor;
    }
    
    
Whether to use a single global lock for requires.

See also:
Options.GLOBAL_REQUIRE_LOCK
    public boolean isGlobalRequireLock() {
        return ;
    }
    
    
Set whether to use a single global lock for requires.
    public void setGlobalRequireLock(boolean globalRequireLock) {
        this. = globalRequireLock;
    }

    
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
    public void setJitBackground(boolean jitBackground) {
        this. = jitBackground;
    }

    
Get whether the JIT compiler will run in a background thread.

Returns:
whether the JIT compiler will run in a background thread
    public boolean getJitBackground() {
        return ;
    }

    
Set whether to load and setup bundler on startup.
    public void setLoadGemfile(boolean loadGemfile) {
        this. = loadGemfile;
    }

    
Whether to load and setup bundler on startup.
    public boolean getLoadGemfile() {
        return ;
    }

    
Set the maximum number of methods to consider when profiling.
    public void setProfileMaxMethods(int profileMaxMethods) {
        this. = profileMaxMethods;
    }

    
Get the maximum number of methods to consider when profiling.
    public int getProfileMaxMethods() {
        return ;
    }
    
    ////////////////////////////////////////////////////////////////////////////
    // Configuration fields.
    ////////////////////////////////////////////////////////////////////////////
    
    
Indicates whether the script must be extracted from script source
    private boolean xFlag;

    
Indicates whether the script has a shebang line or not
    private boolean hasShebangLine;
    private InputStream input          = .;
    private PrintStream output         = .;