You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripting-scala's eval function does not quite match the JSR233 implementations for Nashorn and Jython. Specifically, eval should make an entry in the ScriptContext.ENGINE_SCOPE bindings whenever it receives a string that causes a new variable or method to be defined.
For example, this should cause a new variable called twelve to be defined:
eval("val twelve = 12")
I exercise several JSR233 implementations in a test suite here, and highlight this issue here.
The scripting-java and scripting-clojure projects probably suffer from the same bug.
The text was updated successfully, but these errors were encountered:
Implementations moved recently to Scala 3 and its implementation of the Script Engine. That implementation currently has no support for bindings (scala/scala3#17237). However, the bindings are emulated in the new ScalaAdaptedScriptEngine.
I added a test to verify the the issue reported here was addressed:
scripting-scala
'seval
function does not quite match the JSR233 implementations for Nashorn and Jython. Specifically, eval should make an entry in theScriptContext.ENGINE_SCOPE
bindings whenever it receives a string that causes a new variable or method to be defined.For example, this should cause a new variable called
twelve
to be defined:I exercise several JSR233 implementations in a test suite here, and highlight this issue here.
The
scripting-java
andscripting-clojure
projects probably suffer from the same bug.The text was updated successfully, but these errors were encountered: