title: Script engine turning integers to strings
body: <p>I'm using the javax ScriptEngine for a project. The actual call looks like:</p>
  
  <pre><code>public static Object runFunction(String function, Object[] arguments) throws ScriptException {
      RHINO_SCRIPT_ENGINE.put("value", arguments);
      return RHINO_SCRIPT_ENGINE.eval(function);
  }
  </code></pre>
  
  <p>whereas the variable <code>arguments</code> contains 2 objects of the type <code>Integer</code> (1 and 2) and the variable <code>function</code> contains the function to evaluate <code>"value[0] + value[1]"</code></p>
  
  <p>In my understanding with the given arguments, the evaluated function should return the int value <code>3</code> instead it's doing a string concatenation and returns <code>"12"</code></p>
  
  <p>I'm clearly setting an array of Integers to the argument <code>value</code>. Can anyone tell me why the script engine is handling it like a String array anyway?</p>