• rswindell's avatar
    Revert the last commit (mostly): don't treat array arguments to js.exec() · ac1a0004
    rswindell authored
    specially, just pass them on to the script as-is. Included a JSDOC note about
    the use of js.exec.apply() to pass a variable number of arguments (ala execv).
    
    Thanks Tracker1 for the pointer to 'spread' which led me to function.apply()
    and the JS-standard method of achieving the result I needed with this
    enhancement.
    
    I still think that a script that calls exit() is unlikely to expect non-string
    arguments in the first place, but if we don't need special case behavior, it's
    better not to add it and keep the behavior consistent with load() and
    require(). That was the decision of the executive board anyway. :-|
    ac1a0004
js_internal.c 24.9 KB