From b8604fa4807a3c06c5a668c074ef44e78c73986e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herbert=20Voj=C4=8D=C3=ADk?= Date: Thu, 12 Feb 2015 14:50:47 +0100 Subject: [PATCH] module: replace NativeModule.require The NativeModule system passes NativeModule.require transparently and so is unnecessary to call explicitly. The only one which should have the prefix is the in line 295, where actually implements a big fs-based module system and actually requires a native module. That is left unchanged. PR-URL: https://github.com/joyent/node/pull/9201 Ref: https://github.com/joyent/node/issues/2009 Reviewed-by: Trevor Norris --- lib/module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/module.js b/lib/module.js index da51cf5ec0a53b..4ac8cfa30a0257 100644 --- a/lib/module.js +++ b/lib/module.js @@ -20,11 +20,11 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. var NativeModule = require('native_module'); -var util = NativeModule.require('util'); +var util = require('util'); var runInThisContext = require('vm').runInThisContext; var runInNewContext = require('vm').runInNewContext; var assert = require('assert').ok; -var fs = NativeModule.require('fs'); +var fs = require('fs'); // If obj.hasOwnProperty has been overridden, then calling @@ -61,7 +61,7 @@ Module.globalPaths = []; Module.wrapper = NativeModule.wrapper; Module.wrap = NativeModule.wrap; -var path = NativeModule.require('path'); +var path = require('path'); Module._debug = util.debuglog('module');