Skip to content

feat: show eval results that are not plain data as text - #20

Merged
NenkaLab merged 1 commit into
masterfrom
feat/eval-shows-results
Nov 4, 2026
Merged

NenkaLab merged 1 commit into
masterfrom
feat/eval-shows-results

Conversation

@NenkaLab

@NenkaLab NenkaLab commented Nov 4, 2026

Copy link
Copy Markdown
Member

What changed

ScriptEngine.eval says what a result that cannot cross as a Value becomes: not an error, but a string that shows it in the language's own notation. The JavaScript conformance suite checks it: an object holding a function comes back as text containing [Function: get], a function comes back as a string, and plain data still comes back as data.

Why

A sandbox uses eval as a REPL. The Rhino engine already showed such a result as text, but the Node engine failed with "The result cannot leave the script", so the same input behaved differently per engine. It showed up on a device test where a Node sandbox evaluated BotProvider.

Testing

The Rhino engine in MessengerBotR passes the new case (RhinoConformanceTest). The Node engine needs a follow-up in NodeJSPlugin, which already passes it on a device through SandboxOnDeviceTest.

@NenkaLab
NenkaLab merged commit cf61c58 into master Nov 4, 2026
1 check passed
@NenkaLab
NenkaLab deleted the feat/eval-shows-results branch November 15, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant