JSR 223 code execution breaks with JRuby 1.6.4

Hi all,
I use the ScriptEngineManager to execute Ruby Scripts from Java Code,
but with JRuby 1.6.4 the following code breaks:
for (; ; ) {
ScriptEngineManager m = new ScriptEngineManager();
m.getEngineByExtension(“rb”).eval(“puts(”"+new Date()+"")");
}

The loop stops with no error message after about 20 outputs. If I use
the same code with JRuby 1.5.6 everything works fine. Am I doing
something wrong?

Java Version: 1.6.0_27 /Win7 64-bit
JRuby: 1.6.4 (Version: TSTAMP: 1200, DSTAMP: 20110823)

Code breaks with “jruby-complete-1.6.4.jar” and also with
“jruby-complete-1.6.3.jar”

Thanks!
Regards
l

Hello,

On Wed, Sep 21, 2011 at 3:54 AM, liareuper [email protected] wrote:

Hi all,
I use the ScriptEngineManager to execute Ruby Scripts from Java Code, but with
JRuby 1.6.4 the following code breaks:
for (; ; ) {
ScriptEngineManager m = new ScriptEngineManager();
m.getEngineByExtension(“rb”).eval(“puts(”"+new Date()+"")");
}

The loop stops with no error message after about 20 outputs. If I use the same
code with JRuby 1.5.6 everything works fine. Am I doing something wrong?

Thanks for reporting this. I confirmed exactly the same weird behavior
on master, too. This doesn’t happen on ScriptingContainer, so is a
JSR223 impl bug probably. I’m going to look into this bug.

Would you file this in JIRA? You can track a bug fixing.

-Yoko

Hi,
I reported the bug at JIRA:

http://jira.codehaus.org/browse/JRUBY-6101

Thanks!
l

— Yoko H. [email protected] schrieb am Mi, 28.9.2011:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs