for (var i in proto) {
if (proto.hasOwnProperty(i) && ignored.indexOf(i) === -1) {
- this.repl.context[i] = proto[i].bind(this);
- this.repl.context[i]._debugger = true;
+ Object.defineProperty(this.repl.context, i, {
+ get: proto[i].bind(this),
+ enumerable: true
+ });
}
}
try {
var result = vm.runInContext(code, context, filename);
- // Simulate getters
- if (typeof result === 'function' && result._debugger) {
- result = result();
- }
-
if (this.paused === 0) return callback(null, result);
this.waiting = function() {
callback(null, result);