[jQuery] 1.0.4 breaks sort (w/ fix)

[jQuery] 1.0.4 breaks sort (w/ fix)

The "sort plugin" <<a href="http://jquery.com/dev/bugs/bug/255/"> http://jquery.com/dev/bugs/bug/255/</a>> breaks in jQuery 1.0.4 with the following error:
second argument to Function.prototype.apply must be an array
Down in set(), called from pushStack. Apparently, the array returned from apply isn't array enough to pass into apply down in set. I fixed it by wrapping the sort.apply() with merge:
jQuery.fn.sort = function() {
  return this.pushStack( jQuery.merge( [].sort.apply( this, arguments ), []), [] );
};
I would just add a note to the bug page for this and move on, but I'm wondering if this is behavior that should be incorporated into the set() function? Are there other things expecting to pass not-quite-array objects to pushStack and have them dealt with properly?
--Erik
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/