JSR-223 ScriptEngine does not use provided Bindings
---------------------------------------------------

                 Key: JRUBY-4943
                 URL: http://jira.codehaus.org/browse/JRUBY-4943
             Project: JRuby
          Issue Type: Bug
          Components: Embedding
    Affects Versions: JRuby 1.5.1
            Reporter: Michael S. Allman
         Attachments: ScriptEngineBindingsExample.java

Assume

ScriptEngine engine = engineManager.getEngineByName("ruby")

The call to

engine.setBindings(bindings, ScriptContext.ENGINE_SCOPE)

doesn't actually set the engine's bindings to "bindings".  It copies the 
entries of "bindings".  The obvious problem here is that any modifications made 
to the "bindings" map after the call to setBindings() will not be visible to 
the script engine.

I'm attaching a simple executable Java class to illustrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to