File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,6 @@ exports.trace = function(label) {
8484exports . assert = function ( expression ) {
8585 if ( ! expression ) {
8686 var arr = Array . prototype . slice . call ( arguments , 1 ) ;
87- process . assert ( false , format . apply ( this , arr ) ) ;
87+ require ( ' assert' ) . ok ( false , format . apply ( this , arr ) ) ;
8888 }
8989} ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ var stream = require('stream');
44var EventEmitter = require ( 'events' ) . EventEmitter ;
55var FreeList = require ( 'freelist' ) . FreeList ;
66var HTTPParser = process . binding ( 'http_parser' ) . HTTPParser ;
7- var assert = process . assert ;
7+ var assert = require ( ' assert' ) . ok ;
88
99
1010var debug ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var NativeModule = require('native_module');
22var Script = process . binding ( 'evals' ) . Script ;
33var runInThisContext = Script . runInThisContext ;
44var runInNewContext = Script . runInNewContext ;
5- var assert = process . assert ;
5+ var assert = require ( ' assert' ) . ok ;
66
77function Module ( id , parent ) {
88 this . id = id ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ var FreeList = require('freelist').FreeList;
2828
2929var IOWatcher = process . binding ( 'io_watcher' ) . IOWatcher ;
3030var constants = process . binding ( 'constants' ) ;
31- var assert = process . assert ;
31+ var assert = require ( ' assert' ) . ok ;
3232
3333var socket = binding . socket ;
3434var bind = binding . bind ;
Original file line number Diff line number Diff line change 11var Timer = process . binding ( 'timer' ) . Timer ;
22var L = require ( '_linklist' ) ;
3- var assert = process . assert ;
3+ var assert = require ( ' assert' ) . ok ;
44
55var debug ;
66if ( process . env . NODE_debug && / t i m e r / . test ( process . env . NODE_debug ) ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ var net = require('net');
44var events = require ( 'events' ) ;
55var stream = require ( 'stream' ) ;
66
7- var assert = process . assert ;
7+ var assert = require ( ' assert' ) . ok ;
88
99var debug ;
1010if ( process . env . NODE_DEBUG && / t l s / . test ( process . env . NODE_DEBUG ) ) {
Original file line number Diff line number Diff line change 243243 } ;
244244
245245 startup . _removedProcessMethods = {
246+ 'assert' : 'process.assert() use require("assert").ok() instead' ,
246247 'debug' : 'process.debug() use console.error() instead' ,
247248 'error' : 'process.error() use console.error() instead' ,
248249 'watchFile' : 'process.watchFile() has moved to fs.watchFile()' ,
You can’t perform that action at this time.
0 commit comments