summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-04-21 13:53:49 -0700
committerNathan Rajlich <nathan@tootallnate.net>2012-04-21 13:53:49 -0700
commite16021340dd38895b8c7f310355e3a79881f45ed (patch)
treeee3c90c7aa849dc5824f8ba4a0b7e80ebca14e6f /lib
parentc0a9985da7a7d3f6ebc51805d6955d92b1bd6e78 (diff)
downloadnode-new-e16021340dd38895b8c7f310355e3a79881f45ed.tar.gz
repl: use Object.getPrototypeOf on functions for tab complete()
Diffstat (limited to 'lib')
-rw-r--r--lib/repl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/repl.js b/lib/repl.js
index 0a81ebc7df..9cd88afb84 100644
--- a/lib/repl.js
+++ b/lib/repl.js
@@ -589,7 +589,7 @@ REPLServer.prototype.complete = function(line, callback) {
try {
var sentinel = 5;
var p;
- if (typeof obj == 'object') {
+ if (typeof obj === 'object' || typeof obj === 'function') {
p = Object.getPrototypeOf(obj);
} else {
p = obj.constructor ? obj.constructor.prototype : null;