Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert.deepEqual: fix bug with faked boxed primitives #29029

Closed
wants to merge 3 commits into from

Conversation

@ljharb
Copy link
Member

commented Aug 7, 2019

I discovered this bug while perusing the code, to try to bring the npm deep-equal package into sync with node's.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
    • note: the related tests have passed; i didn't run the full suite
  • tests and/or benchmarks are included
  • documentation is changed or added (n/a)
  • commit message follows commit guidelines

ljharb added some commits Aug 6, 2019

@ljharb ljharb requested review from targos, joyeecheung, devsnek and BridgeAR Aug 7, 2019

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

@nodejs/assert

@ljharb ljharb force-pushed the ljharb:deep_equal_boxed_primitive branch 2 times, most recently from b30d71d to 2737496 Aug 7, 2019

@ljharb ljharb force-pushed the ljharb:deep_equal_boxed_primitive branch from 2737496 to d90707a Aug 7, 2019

@jasnell

jasnell approved these changes Aug 7, 2019

@devsnek

devsnek approved these changes Aug 7, 2019

@targos

targos approved these changes Aug 7, 2019

@Trott

Trott approved these changes Aug 7, 2019

@nodejs-github-bot

This comment has been minimized.

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Not semver-major, but since assert.deepEqual() can get weird, running CITGM anyway....

If interested in making deepEqual() less weird, check out #28011.

@trivikr trivikr added the author ready label Aug 8, 2019

@devsnek

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

Landed in 885c644...8fdd634

@devsnek devsnek closed this Aug 9, 2019

@devsnek devsnek removed the author ready label Aug 9, 2019

devsnek added a commit that referenced this pull request Aug 9, 2019

test: assert: add failing deepEqual test for faked boxed primitives
PR-URL: #29029
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>

devsnek added a commit that referenced this pull request Aug 9, 2019

util: assert: fix deepEqual comparing fake-boxed to real boxed primitive
PR-URL: #29029
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>

devsnek added a commit that referenced this pull request Aug 9, 2019

util: isEqualBoxedPrimitive: ensure both values are actual boxed Symbols
... before trying to valueOf them

PR-URL: #29029
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>

@ljharb ljharb deleted the ljharb:deep_equal_boxed_primitive branch Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.