From 280508493160a53b6f40d0cbcf485aca7f21e70f Mon Sep 17 00:00:00 2001 From: tompng Date: Sun, 15 Mar 2026 04:40:17 +0900 Subject: [PATCH] Fix display_document test fails in tty environment --- test/irb/test_input_method.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/irb/test_input_method.rb b/test/irb/test_input_method.rb index 2045e3321..c77dab1ac 100644 --- a/test/irb/test_input_method.rb +++ b/test/irb/test_input_method.rb @@ -111,10 +111,14 @@ def setup end def display_document(target, bind, driver = nil) + use_pager = IRB.conf[:USE_PAGER] + IRB.conf[:USE_PAGER] = false input_method = IRB::RelineInputMethod.new(IRB::RegexpCompletor.new) input_method.instance_variable_set(:@rdoc_ri_driver, driver) if driver input_method.instance_variable_set(:@completion_params, ['', target, '', bind]) input_method.display_document(target) + ensure + IRB.conf[:USE_PAGER] = use_pager end def test_perfectly_matched_namespace_triggers_document_display