http://dev.rubyonrails.org/browser/spinoffs/prototype/src/base.js contains this definition:
Function.prototype.bind = function() { var __method = this, args = $A(arguments), object = args.shift(); return function() { return __method.apply(object, args.concat($A(arguments))); } } In other words, if a bound function is given the arguments (This,A,B,C) the underlying method has 'this' bound to the value of This and the underlying method gets the arguments (A,B,C,This,A,B,C) I've found no comments indicating why an extra copy of arguments is used. It doesn't seem like it would be safe to use this extra copy (as it seems like an undocumented feature), and I'm trying to understand why it's there at all. Is this just hasty code, or is it a workaround for some bug or what? (Or if I'm asking in the wrong place, let me know.) Thanks, -- Raul _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs