diff --git a/lib/irb/init.rb b/lib/irb/init.rb index d474bd41d..ee07862cd 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -79,7 +79,7 @@ def IRB.init_config(ap_path) @CONF[:USE_SINGLELINE] = false unless defined?(ReadlineInputMethod) @CONF[:USE_COLORIZE] = (nc = ENV['NO_COLOR']).nil? || nc.empty? - @CONF[:USE_AUTOCOMPLETE] = ENV.fetch("IRB_USE_AUTOCOMPLETE", "true") != "false" + @CONF[:USE_AUTOCOMPLETE] = ENV.fetch("IRB_USE_AUTOCOMPLETE", "false") != "false" @CONF[:COMPLETOR] = ENV["IRB_COMPLETOR"]&.to_sym @CONF[:INSPECT_MODE] = true @CONF[:USE_TRACER] = false diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 9fa23ccce..71f256d8b 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -215,7 +215,7 @@ def inspect end def test_default_config - assert_equal(true, @context.use_autocomplete?) + assert_equal(false, @context.use_autocomplete?) end def test_echo_on_assignment diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb index f7168e02f..99b79b60b 100644 --- a/test/irb/test_init.rb +++ b/test/irb/test_init.rb @@ -145,7 +145,7 @@ def test_use_autocomplete_environment_variable ENV['IRB_USE_AUTOCOMPLETE'] = nil IRB.setup(__FILE__) - assert IRB.conf[:USE_AUTOCOMPLETE] + refute IRB.conf[:USE_AUTOCOMPLETE] ENV['IRB_USE_AUTOCOMPLETE'] = '' IRB.setup(__FILE__) diff --git a/test/irb/test_type_completor.rb b/test/irb/test_type_completor.rb index 3d0e25d19..2697eed88 100644 --- a/test/irb/test_type_completor.rb +++ b/test/irb/test_type_completor.rb @@ -101,7 +101,6 @@ def test_type_completor type "puts completor.doc_namespace 'a = n.chr;', 'a.encoding', '', bind: binding" type "exit!" end - assert_match(/Completion: Autocomplete, ReplTypeCompletor/, output) assert_match(/a\.bit_length/, output) assert_match(/String#encoding/, output) end