projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7065ea
)
repl: ensure that 'repl.ignoreUndefined' is a boolean
author
Nathan Rajlich
<nathan@tootallnate.net>
Wed, 28 Mar 2012 00:35:33 +0000
(17:35 -0700)
committer
Nathan Rajlich
<nathan@tootallnate.net>
Wed, 28 Mar 2012 00:35:33 +0000
(17:35 -0700)
lib/repl.js
patch
|
blob
|
history
diff --git
a/lib/repl.js
b/lib/repl.js
index 89ac5685f672e111a8cc50573e6adb1e1453dda7..2ee5c76aa0c6e8e59ebbf6893972d2bc50f02fba 100644
(file)
--- a/
lib/repl.js
+++ b/
lib/repl.js
@@
-102,6
+102,7
@@
function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) {
var self = this;
self.useGlobal = !!useGlobal;
+ self.ignoreUndefined = !!ignoreUndefined;
self.eval = eval || function(code, context, file, cb) {
var err, result;
@@
-290,7
+291,7
@@
function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) {
self.bufferedCommand = '';
// If we got any output - print it (if no error)
- if (!e && (!ignoreUndefined || ret !== undefined)) {
+ if (!e && (!
self.
ignoreUndefined || ret !== undefined)) {
self.context._ = ret;
self.outputStream.write(exports.writer(ret) + '\n');
}