Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Change removed process methods to be non-enumerable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Benvie authored and bnoordhuis committed Jan 29, 2012
1 parent e4afb2f commit e3c0c86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/node.js
Expand Up @@ -459,9 +459,15 @@
};

startup.removedMethods = function() {
var desc = {
configurable: true,
writable: true,
enumerable: false
};
for (var method in startup._removedProcessMethods) {
var reason = startup._removedProcessMethods[method];
process[method] = startup._removedMethod(reason);
desc.value = startup._removedMethod(reason);
Object.defineProperty(process, method, desc);
}
};

Expand Down

0 comments on commit e3c0c86

Please sign in to comment.