Skip to content

util: remove unreachable branch - #24447

Merged
refack merged 1 commit into
nodejs:masterfrom
rahulshuklab4u:master
Nov 20, 2018
Merged

util: remove unreachable branch#24447
refack merged 1 commit into
nodejs:masterfrom
rahulshuklab4u:master

Conversation

@rahulshuklab4u

Copy link
Copy Markdown
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-botnodejs-github-bot added the util Issues and PRs related to the built-in util module. label Nov 17, 2018
@Trott

Copy link
Copy Markdown
Member

/ping @nodejs/util (especially @BridgeAR)

@refack
refack requested a review from BridgeARNovember 17, 2018 23:40
@refack

refack commented Nov 17, 2018

Copy link
Copy Markdown
Contributor

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

}elseif(Array.isArray(value)){
constclazz=Object.getPrototypeOf(value)||
clazzWithNullPrototype(Array,'Array');
newVal=newclazz(value.length||0);

@refack

Copy link
Copy Markdown
Contributor

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.

@gireeshpunathilgireeshpunathil 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
Copy Markdown
Member

@addaleaxaddaleax 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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@refackrefack 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:masterNov 20, 2018
@refack

Copy link
Copy Markdown
Contributor

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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeARBridgeAR 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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebyterecodebytere mentioned this pull request Jan 15, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.utilIssues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@rahulshuklab4u@Trott@refack@addaleax@jasnell@sagirk@starkwang@gireeshpunathil@nodejs-github-bot