Browse Source

Another fix for process.assert

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
bfb6a67d60
  1. 2
      lib/console.js
  2. 2
      lib/http.js
  3. 2
      lib/module.js
  4. 2
      lib/net.js
  5. 2
      lib/timers.js
  6. 2
      lib/tls.js
  7. 1
      src/node.js

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));
}
};

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;

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;

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;

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)) {

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)) {

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()',

Loading…
Cancel
Save