rhino-script-engine icon indicating copy to clipboard operation
rhino-script-engine copied to clipboard

Issue with Native Rhino object handling when declare in global scope

Open ic3fox opened this issue 10 years ago • 0 comments

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.

ic3fox avatar Aug 21 '15 10:08 ic3fox