diff --git a/lib/timers.js b/lib/timers.js index 00bbdc9391..5612184ea1 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -424,14 +424,16 @@ Immediate.prototype._idlePrev = undefined; exports.setImmediate = function(callback) { var immediate = new Immediate(); - var args; + var args, index; L.init(immediate); immediate._onImmediate = callback; if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments, 1); + args = []; + for (index = 1; index < arguments.length; index++) + args.push(arguments[index]); immediate._onImmediate = function() { callback.apply(immediate, args);