The arguments object can usually be used in place of an Array. This should work fine.

On Mar 28, 2014, at 4:31 PM, jessehouchins <notifications@github.com> wrote:

> In lib/async.js:
> 
> > +    //(when the first argument of the callback is true) before giving up.
> > +    //It overrides the original callback  function in order to test for the value of the first argument until it 
> > +    //is false (no error) or the retry cap is reached.
> > +    /*
> > +    @param {times} {int} Number of retries before calling the original callback upon failure
> > +    @param {func} {Function} The function to retry
> > +    async.retry = function(times, func) {
> > +      var retries = 0;
> > +      if(typeof times == "function") {
> > +          func = times;
> > +          times = 5; //Default
> > +      }
> > +      return function() {
> > +          var args = arguments;
> > +          function retry(original_fn) {
> > +               original_fn.apply(null,args);
> Passing arguments straight like this doesn't work, does it? I though apply required type Array...
> 
> —
> Reply to this email directly or view it on GitHub.
>