From 8c872508166ced35a838292e4b950e7c929c7240 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 12 Sep 2011 18:25:00 -0700 Subject: [PATCH] Do not load readline from util.inspect This causes all modules using console.log() to load readline which seems unnecessary. --- lib/util.js | 2 +- test/simple/test-module-load-list.js | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/util.js b/lib/util.js index 5e4f1a67a2..c2a118acef 100644 --- a/lib/util.js +++ b/lib/util.js @@ -365,7 +365,7 @@ function reduceToSingleString(output, base, braces) { return prev + cur.length + 1; }, 0); - if (length > (require('readline').columns || 50)) { + if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + diff --git a/test/simple/test-module-load-list.js b/test/simple/test-module-load-list.js index ba430fa11e..fb2a72ebd6 100644 --- a/test/simple/test-module-load-list.js +++ b/test/simple/test-module-load-list.js @@ -78,13 +78,6 @@ if (!process.features.uv) { case 'fs': expected = expected.concat([ 'NativeModule console', - 'NativeModule readline', - 'NativeModule tty', - 'NativeModule tty_posix', - 'NativeModule net_uv', - 'NativeModule timers_uv', - 'Binding timer_wrap', - 'NativeModule _linklist', ]); break; @@ -98,7 +91,6 @@ if (!process.features.uv) { 'Binding timer_wrap', 'NativeModule _linklist', 'Binding pipe_wrap', - 'NativeModule readline' ]); break; @@ -110,9 +102,6 @@ if (!process.features.uv) { 'Binding timer_wrap', 'NativeModule _linklist', 'Binding pipe_wrap', - 'NativeModule readline', - 'NativeModule tty', - 'NativeModule tty_posix', ]); break;