deno_std
deno_std copied to clipboard
fix(assert): make prototype of Object.prototype not equal undefined prototype
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.
Changed to draft because I realized this makes behavior different when objects have properties: https://github.com/denoland/std/issues/6334#issuecomment-2730103563
This PR hasn't had activity in almost 6 months. Should we close as stale for now?
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.