Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
import{arrayBuffer,arrayBufferSync}from'node:stream/iter';constshared=newSharedArrayBuffer(4);constchunk=newUint8Array(shared);constasyncResult=awaitarrayBuffer([chunk]);constsyncResult=arrayBufferSync([chunk]);console.log('arrayBuffer():',asyncResult.constructor.name);console.log('arrayBufferSync():',syncResult.constructor.name);console.log('async instanceof ArrayBuffer:',asyncResultinstanceofArrayBuffer);console.log('sync instanceof ArrayBuffer:',syncResultinstanceofArrayBuffer);How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
arrayBuffer(): ArrayBufferarrayBufferSync(): ArrayBufferasync instanceof ArrayBuffer: truesync instanceof ArrayBuffer: true
Spec §11.3 says
- Let bytes be the result of bytes() with source and options.
Spec §11.1 says
- If chunks has exactly one element whose buffer is not shared, return that element.
- Otherwise, concatenate all chunks into a new Uint8Array and return it.
What do you see instead?
arrayBuffer(): SharedArrayBufferarrayBufferSync(): SharedArrayBufferasync instanceof ArrayBuffer: falsesync instanceof ArrayBuffer: false
Additional information
No response
Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Spec §11.3 says
Spec §11.1 says
What do you see instead?
Additional information
No response