debugger: don't override module binding
authorVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Fri, 23 Jan 2015 14:09:42 +0000 (17:09 +0300)
committercjihrig <cjihrig@gmail.com>
Fri, 23 Jan 2015 14:54:27 +0000 (09:54 -0500)
Overriding module argument with const causes a SyntaxError. This
commit changes the variable name to remove the error.

PR-URL: https://github.com/iojs/io.js/pull/572
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
lib/_debugger.js

index 0789f35..0dc9c95 100644 (file)
@@ -4,8 +4,8 @@ const util = require('util');
 const path = require('path');
 const net = require('net');
 const vm = require('vm');
-const module = require('module');
-const repl = module.requireRepl();
+const Module = require('module');
+const repl = Module.requireRepl();
 const inherits = util.inherits;
 const assert = require('assert');
 const spawn = require('child_process').spawn;
@@ -1110,7 +1110,7 @@ Interface.prototype.list = function(delta) {
       if (lineno == 1) {
         // The first line needs to have the module wrapper filtered out of
         // it.
-        var wrapper = module.wrapper[0];
+        var wrapper = Module.wrapper[0];
         lines[i] = lines[i].slice(wrapper.length);
 
         client.currentSourceColumn -= wrapper.length;