On Tue, Jun 2, 2009 at 3:28 PM, Morten <[email protected]> wrote: > Thanks for the warning. Correct JSR223 behavior is critical for me so I > guess I have to stay with JRuby 1.2 for the time being..... Did you report a > bug yet?
I just filed the bug, http://jira.codehaus.org/browse/JRUBY-3729, though this might be a task of JRuby enigne. -Yoko > > --- Den tirs 2/6/09 skrev Yoko Harada <[email protected]>: > > Fra: Yoko Harada <[email protected]> > Emne: Re: [jruby-dev] JSR223 & JRuby 1.3.0RC2 > Til: [email protected] > Dato: tirsdag 2. juni 2009 21.12 > > Asiri, > > On Tue, Jun 2, 2009 at 4:00 AM, Asiri Rathnayake > <[email protected]> wrote: >> Hi Devs, >> >> I tried the following code snippet with two versions of JRuby: >> >> <code> >> >> ScriptEngineManager manager = new ScriptEngineManager(); >> ScriptEngine engine = manager.getEngineByName("jruby"); >> engine.put("who", "Asiri"); >> engine.eval("puts \"Hello #{$who}!\""); >> >> </code> >> >> With 1.2.0 above code snippet works fine and prints "Hello Asiri!". But >> with >> 1.3.0RC2 the output is "Hello !" >> >> Am I doing something wrong? or is it a bug? > > I got the same result, so you are doing in a right way. Sharing global > varables worked on the version I got from git on May 14. After that, > JRuby's internal API must have been changed and affects on above > result. > > JSR 223 JRuby engine overrides > org.jruby.internal.runtime.GlobalVariables and save global variables > in its attribute map to revert GlobalVariables to the original > condition. As far as I tracked variables down, the instance of > GlobalVariables that JRuby engine has is not used while evaluating. > However, I haven't figured out how to fix this. Does someone know what > changes were made related to GlobalVariables? > > -Yoko > >> >> Thanks. >> >> - Asiri >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > ________________________________ > Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på LCD > TV! --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
