rhino-script-engine
rhino-script-engine copied to clipboard
Issue with Native Rhino object handling when declare in global scope
Hi,
The current implementation of ExternalScriptable doesn't handle properly Native Rhino Object when there declared in global scope.
var FRUITS = 'apple orange banana';
var COLORS = 'red green yellow';
var RESERVED_WORDS = FRUITS + ' ' + COLORS;
(function(){
var words = RESERVED_WORDS.split(' ');
println(words);
return words.length})()
This function will fail with the current implementation of the rhino-script-engine, while it will work properly using standard Rhino.