Changed .get(-Number) to use .slice() instead of .toArray() (which doesn't take any...
[jquery.git] / src / core.js
index b105c4c..cb9b528 100644 (file)
@@ -128,7 +128,9 @@ jQuery.fn = jQuery.prototype = {
                return this.length;
        },
 
-       toArray: slice,
+       toArray: function(){
+               return slice.call( this, 0 );
+       },
 
        // Get the Nth element in the matched element set OR
        // Get the whole matched element set as a clean array
@@ -139,7 +141,7 @@ jQuery.fn = jQuery.prototype = {
                        this.toArray() :
 
                        // Return just the object
-                       ( num < 0 ? this.toArray(num)[ 0 ] : this[ num ] );
+                       ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
        },
 
        // Take an array of elements and push it onto the stack