diff --git a/index.js b/index.js index 7cd95fe..10931c6 100644 --- a/index.js +++ b/index.js @@ -285,8 +285,6 @@ Buffer.concat = function concat (list, length) { if (list.length === 0) { return new Buffer(0) - } else if (list.length === 1) { - return list[0] } var i diff --git a/test/methods.js b/test/methods.js index 4f997c0..b6b7c74 100644 --- a/test/methods.js +++ b/test/methods.js @@ -55,7 +55,7 @@ test('concat() a varying number of buffers', function (t) { t.equal(flatZero.length, 0) t.equal(flatOne.toString(), 'asdf') - t.equal(flatOne, one[0]) + t.deepEqual(flatOne, one[0]) t.equal(flatLong.toString(), (new Array(10 + 1).join('asdf'))) t.equal(flatLongLen.toString(), (new Array(10 + 1).join('asdf'))) t.end()