Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created March 7, 2011 19:30
Show Gist options
  • Save jberkel/859044 to your computer and use it in GitHub Desktop.
Save jberkel/859044 to your computer and use it in GitHub Desktop.
if (moreStack) {
final String[] ret = new String[1];
try {
Thread t = new Thread(null, null, "executor", 16*1024) {
@Override public void run() {
try {
ret[0] = ruby.evalScriptlet(code, scope).inspect().toJava(String.class).toString();
} catch (final RaiseException e) {
handler.post(new Runnable() {
public void run() {
e.printStackTrace(ruby.getErrorStream());
}
});
}
}
};
t.start();
t.join();
return ret[0];
} catch (InterruptedException e) {
return null;
}
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment