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

util: remove unreachable branch #24447

Merged
merged 1 commit into from
Nov 20, 2018
Merged

util: remove unreachable branch #24447

merged 1 commit into from
Nov 20, 2018

Conversation

rahulshuklab4u
Copy link
Contributor

Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the util Issues and PRs related to the built-in util module. label Nov 17, 2018
@Trott
Copy link
Member

Trott commented Nov 17, 2018

/ping @nodejs/util (especially @BridgeAR)

@refack refack requested a review from BridgeAR November 17, 2018 23:40
@refack
Copy link
Contributor

refack commented Nov 17, 2018

Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

Also since value passes an isArray test, it is guaranteed to have a non negative, defined length property

} else if (Array.isArray(value)) {
const clazz = Object.getPrototypeOf(value) ||
clazzWithNullPrototype(Array, 'Array');
newVal = new clazz(value.length || 0);

@refack
Copy link
Contributor

refack commented Nov 17, 2018

Hello @rahulshuklab4u and welcome. Thank you for your contribution 🥇
If you are not familiar with our review and landing process, it's covered in CONTRIBUTING.md

P.S. If you have any questions you can also feel free to contact me directly.

@gireeshpunathil gireeshpunathil added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 18, 2018
@addaleax
Copy link
Member

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 20, 2018
Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

PR-URL: nodejs#24447
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@refack refack removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 20, 2018
@refack refack merged commit fbc2916 into nodejs:master Nov 20, 2018
@refack
Copy link
Contributor

refack commented Nov 20, 2018

Congratulations @rahulshuklab4u on getting promoted by GitHub from:
image
to:
image

🎉

targos pushed a commit that referenced this pull request Nov 21, 2018
Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

PR-URL: #24447
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

PR-URL: #24447
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
4 tasks
codebytere pushed a commit that referenced this pull request Jan 13, 2019
Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

PR-URL: #24447
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
Re-defining the array length will always set to 0.
Hence, the code branch can not be covered.

PR-URL: nodejs#24447
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants