From 523929c9272a53c9429616564a45f2af59670e47 Mon Sep 17 00:00:00 2001 From: Emmanuel Odeke Date: Wed, 22 Oct 2014 16:57:51 -0600 Subject: repl: Private Buffer object in lib/* files Fixes usage of global object 'Buffer' in lib/* files by ensuring that each file does an explicit require('buffer').Buffer. Previously, when running a repl, due to usage of global 'Buffer', any redefinition of Buffer would cause a crash eg var Buffer = {}. Fixes: https://github.com/joyent/node/issues/8588 PR-URL: https://github.com/joyent/node/pull/8603 Reviewed-by: Trevor Norris --- lib/fs.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/fs.js') diff --git a/lib/fs.js b/lib/fs.js index 1e3dc6415..626f38c1d 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -31,6 +31,7 @@ var pathModule = require('path'); var binding = process.binding('fs'); var constants = process.binding('constants'); var fs = exports; +var Buffer = require('buffer').Buffer; var Stream = require('stream').Stream; var EventEmitter = require('events').EventEmitter; -- cgit v1.2.1