JIT compilation when running scripts from Java

This is probably a stupid question…

If I run a JRuby script from Java, i.e. using:

String script = …

ScriptingContainer container = new
ScriptingContainer(LocalContextScope.SINGLETHREAD);
container.runScriptlet(script);

Does the runtime use JIT compilation?

Is there any way to to get it use AOT compilation?

Cheers

Hello!

ScriptingContainer has methods set/getCompileMode. See
http://jruby.org/apidocs/ .
The default is CompileMode.JIT, which is the same as running Ruby code
in Ruby way.

-Yoko