Skip to content

Conversation

@feross
Copy link
Owner

@feross feross commented Apr 14, 2020

We now handle calls like:

new Buffer(arraybuffer, 2, 8) so there's no need for this workaround originally implemented in: #97

More info: https://bugs.chromium.org/p/v8/issues/detail?id=4665#c4

Fixes #260. Supersedes #261

We now handle calls like:

new Buffer(arraybuffer, 2, 8) so there's no need for this workaround originally implemented in: #97

More info: https://bugs.chromium.org/p/v8/issues/detail?id=4665#c4

Fixes #260. Supersedes #261
@mikeal
Copy link

mikeal commented Apr 14, 2020

Test still fails for me.

Here’s a super minimal test you can run yourself.

const { Buffer } = require('buffer')
const assert = require('assert')
it('subarray', done => {
  const test = Buffer.from('asdf')
  const sub = test.subarray(2,3)
  assert.ok(Buffer.isBuffer(sub))
  done()
})

This will fail:

npx polendina —cleanup test.js

@mikeal
Copy link

mikeal commented Apr 14, 2020

You know what, I take it back, this does fix it, the module just isn’t being picked up properly when I use a git remote branch in the package.json. If I change the import to a relative path where I’ve checked out this branch the test passes.

👍

@feross feross merged commit 623b441 into master Apr 14, 2020
@feross feross deleted the remove-species branch April 14, 2020 23:54
@feross
Copy link
Owner Author

feross commented Apr 14, 2020

Released as 5.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.subarray method should return Buffer instance

3 participants