Closed
Description
This code is trying to say "Instance of 'foo'"
Not all objects have a constructor with a name, so name$ is 'undefined'.
This causes an error in $.charCodeAt.
$.objectToString = function(object) {
var name$ = (object.constructor.name);
if (
name$ = $.substring$1(name$, 1);
}
return 'Instance of '' +
};
Several tests print objects and fail because of this problem.
I suggest taking the name out of the string returned by Object.prototype.toString.call(receiver)