Skip to content

eval should sometimes make an entry in the ENGINE_SCOPE bindings #5

@mslinn

Description

@mslinn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions