Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Another fix for process.assert

  • Loading branch information...
commit bfb6a67d6042ae06c28e770a75eadc37bdcaa230 1 parent f71e4d8
@ry ry authored
View
2  lib/console.js
@@ -84,6 +84,6 @@ exports.trace = function(label) {
exports.assert = function(expression) {
if (!expression) {
var arr = Array.prototype.slice.call(arguments, 1);
- process.assert(false, format.apply(this, arr));
+ require('assert').ok(false, format.apply(this, arr));
}
};
View
2  lib/http.js
@@ -4,7 +4,7 @@ var stream = require('stream');
var EventEmitter = require('events').EventEmitter;
var FreeList = require('freelist').FreeList;
var HTTPParser = process.binding('http_parser').HTTPParser;
-var assert = process.assert;
+var assert = require('assert').ok;
var debug;
View
2  lib/module.js
@@ -2,7 +2,7 @@ var NativeModule = require('native_module');
var Script = process.binding('evals').Script;
var runInThisContext = Script.runInThisContext;
var runInNewContext = Script.runInNewContext;
-var assert = process.assert;
+var assert = require('assert').ok;
function Module(id, parent) {
this.id = id;
View
2  lib/net.js
@@ -28,7 +28,7 @@ var FreeList = require('freelist').FreeList;
var IOWatcher = process.binding('io_watcher').IOWatcher;
var constants = process.binding('constants');
-var assert = process.assert;
+var assert = require('assert').ok;
var socket = binding.socket;
var bind = binding.bind;
View
2  lib/timers.js
@@ -1,6 +1,6 @@
var Timer = process.binding('timer').Timer;
var L = require('_linklist');
-var assert = process.assert;
+var assert = require('assert').ok;
var debug;
if (process.env.NODE_debug && /timer/.test(process.env.NODE_debug)) {
View
2  lib/tls.js
@@ -4,7 +4,7 @@ var net = require('net');
var events = require('events');
var stream = require('stream');
-var assert = process.assert;
+var assert = require('assert').ok;
var debug;
if (process.env.NODE_DEBUG && /tls/.test(process.env.NODE_DEBUG)) {
View
1  src/node.js
@@ -243,6 +243,7 @@
};
startup._removedProcessMethods = {
+ 'assert': 'process.assert() use require("assert").ok() instead',
'debug': 'process.debug() use console.error() instead',
'error': 'process.error() use console.error() instead',
'watchFile': 'process.watchFile() has moved to fs.watchFile()',
Please sign in to comment.
Something went wrong with that request. Please try again.