jquery/jquery — pull request #913 by matjae (2012-08-28 13:36:01+00:00)
Title: Update src/attributes.js .removeClass() - Method

An empty function call is not the same, as calling a function with an undefined variable.
If we check against !arguments.length instead of undefined, we can tell apart these situations.

OLD:
.removeClass()
removes all classes, as expected

.removeClass(undefined)
also removes all classes, which is wrong in my eyes

NEW:
.removeClass(undefined)
removes nothing, like null, false and "" do

PS: I noticed this while calling element.removeClass(someObject.someVar);
where the object was defined, but someVar was undefined, so this is a pretty common situation, I think.