*
* @param container ScriptingContainer to be set configurations.
*/
public static void setConfiguration(ScriptingContainer container) {
LocalContextProvider provider = container.getProvider();
RubyInstanceConfig config = provider.getRubyInstanceConfig();
String s = System.getProperty(PropertyName.COMPILEMODE.toString());
if (s != null) {
if ("jit".equalsIgnoreCase(s)) {
config.setCompileMode(CompileMode.JIT);
} else if ("force".equalsIgnoreCase(s)) {
config.setCompileMode(CompileMode.FORCE);
} else {
config.setCompileMode(CompileMode.OFF);
}
}
s = System.getProperty(PropertyName.COMPATVERSION.toString());
if (s != null) {
if (isRuby19(s)) {
config.setCompatVersion(CompatVersion.RUBY1_9);
}
}
}