Created
March 7, 2011 19:30
-
-
Save jberkel/859044 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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