Skip to content

Conversation

@mgalexander
Copy link

@mgalexandermgalexander commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Michael Alexander added 2 commits December 1, 2016 11:42
- change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) - explicitly create buffers from utf8 inputs for the compare -
- change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) - explicitly create buffers from utf8 inputs for the compare
@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyllerimyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. buffer Issues and PRs related to the buffer subsystem. labels Dec 1, 2016
@Trott
Copy link
Member

Trott commented Dec 5, 2016

Copy link
Member

@jasnelljasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

assert.strictEqual(0,Buffer.from('hello').slice(0,0).length);
assert.strictEqual(0,Buffer('hello').slice(0,0).length);
assert.strictEqual(0,Buffer.from('hello','utf8').slice(0,0).length);
assert.strictEqual(0,Buffer('hello','utf8').slice(0,0).length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: adding 'utf8' to these is unnecessary since that is the default already.

jasnell pushed a commit that referenced this pull request Dec 5, 2016
* change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) * explicitly create buffers from utf8 inputs for the compare PR-URL: #10048 Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

Landedin 02a4c08. thank you for the PR and for participating in the code-and-learn!

@jasnelljasnell closed this Dec 5, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 6, 2016
* change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) * explicitly create buffers from utf8 inputs for the compare PR-URL: #10048 Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) * explicitly create buffers from utf8 inputs for the compare PR-URL: nodejs#10048 Reviewed-By: James M Snell <[email protected]>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
* change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) * explicitly create buffers from utf8 inputs for the compare PR-URL: nodejs#10048 Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* change implicit string equal() compares to strictEqual compares of buffer output (the slice output default) * explicitly create buffers from utf8 inputs for the compare PR-URL: #10048 Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bufferIssues and PRs related to the buffer subsystem.code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@mgalexander@Trott@jasnell@MylesBorins@addaleax@imyller@nodejs-github-bot