aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-04 12:36:24 -0500
committerjeresig <jeresig@gmail.com>2009-12-04 12:36:24 -0500
commit39a77c2d02d379d15bfe9c2e7b90c92d9cb3a34e (patch)
treed0f08140a1ad63fbe6b65a4d5616e78b40bf890e /src
parent2b481b93cfca62f95aa7005e7db651456fa08e65 (diff)
downloadjquery-39a77c2d02d379d15bfe9c2e7b90c92d9cb3a34e.tar.gz
jquery-39a77c2d02d379d15bfe9c2e7b90c92d9cb3a34e.zip
Switched to using slice instead of join to get the correct results.
Diffstat (limited to 'src')
-rw-r--r--src/traversing.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/traversing.js b/src/traversing.js
index 4efe2823b..57621a390 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -2,8 +2,7 @@ var runtil = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
- slice = Array.prototype.slice,
- join = Array.prototype.join;
+ slice = Array.prototype.slice;
// Implement the identical functionality for filter and not
var winnow = function( elements, qualifier, keep ) {
@@ -138,7 +137,7 @@ jQuery.fn.extend({
slice: function() {
return this.pushStack( slice.apply( this, arguments ),
- "slice", join.call(arguments, ",") );
+ "slice", slice.call(arguments).join(",") );
},
map: function( callback ) {
@@ -187,7 +186,7 @@ jQuery.each({
ret = ret.reverse();
}
- return this.pushStack( ret, name, join.call(arguments, ",") );
+ return this.pushStack( ret, name, slice.call(arguments).join(",") );
};
});