mirror of https://github.com/lukechilds/node.git
Browse Source
REPL evaluate `.scope` when it needs to get a list of the variable names available in the current scope. Do not throw if the output of such evaluation is not array, just ignore it. PR-URL: https://github.com/nodejs/io.js/pull/1682 Reviewed-By: Fedor Indutny <fedor@indutny.com>v2.3.1-release
committed by
Fedor Indutny
3 changed files with 23 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||
var assert = require('assert'); |
|||
var util = require('util'); |
|||
var repl = require('repl'); |
|||
var zlib = require('zlib'); |
|||
|
|||
// just use builtin stream inherited from Duplex
|
|||
var putIn = zlib.createGzip(); |
|||
var testMe = repl.start('', putIn, function(cmd, context, filename, callback) { |
|||
callback(null, cmd); |
|||
}); |
|||
|
|||
testMe._domain.on('error', function (e) { |
|||
assert.fail(); |
|||
}); |
|||
|
|||
testMe.complete('', function(err, results) { |
|||
assert.equal(err, null); |
|||
}); |
Loading…
Reference in new issue