Skip to content

Conversation

JungMinu
Copy link
Member

@JungMinu JungMinu commented Sep 2, 2015

There is no type-conversion to be done because both parameters are already the same type.
Therefore, the === operator should be used for better performance.

There is no type-conversion to be done because both parameters are already the same type. 
Therefore, the === operator should be used for better performance.
@targos
Copy link
Member

targos commented Sep 2, 2015

obj == null is equivalent to strictly comparing against null and undefined. The change you are proposing makes us lose the obj === undefined part. Therefore line 127 would throw if undefined is passed to the Buffer constructor.

@targos targos added the buffer Issues and PRs related to the buffer subsystem. label Sep 2, 2015
@targos
Copy link
Member

targos commented Sep 2, 2015

It should be caught by this test. Did you run make test ?

@JungMinu
Copy link
Member Author

JungMinu commented Sep 2, 2015

@targos Sorry, It was a mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants