deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

fix(assert): make prototype of Object.prototype not equal undefined prototype

Open WWRS opened this issue 8 months ago • 2 comments

Fixes #6334

These were previously hardcoded to be equal, and I'm not completely sure why. I hope I'm not missing something.

It's not mentioned in the PR when it was added (#6153). I suspect it was a port of the old system, where constructors were checked rather than prototypes: Undefined constructor could equal Object constructor. But undefined prototype should not equal Object prototype.

WWRS avatar Mar 17 '25 15:03 WWRS

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 17 '25 15:03 CLAassistant

Changed to draft because I realized this makes behavior different when objects have properties: https://github.com/denoland/std/issues/6334#issuecomment-2730103563

WWRS avatar Mar 17 '25 18:03 WWRS

This PR hasn't had activity in almost 6 months. Should we close as stale for now?

iuioiua avatar Sep 09 '25 23:09 iuioiua

We would need to disambiguate the behavior mentioned in #6334. Determining this behavior doesn't seem like a priority, so if this PR is not moving toward either being outright accepted or outright rejected, it's stale.

WWRS avatar Sep 10 '25 04:09 WWRS