From 2335ecb7fac38f72c8ecedab79fcc2f197249ef3 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 11 Dec 2024 19:30:30 +0800 Subject: [PATCH] [ruby/irb] Page the output in irb:rdbg sessions too (https://github.com/ruby/irb/pull/1043) IRB started to page its evaluation output and it became a useful feature for users. However, in `irb:rdbg` sessions, the output is not paged so the sudden change in behavior is surprising and inconvenient. This commit makes `irb:rdbg` sessions page the output of the debugger too. https://github.com/ruby/irb/commit/8241ec9a0c --- lib/irb/debug/ui.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/irb/debug/ui.rb b/lib/irb/debug/ui.rb index 7a1cd6dd16..a21ec6b11d 100644 --- a/lib/irb/debug/ui.rb +++ b/lib/irb/debug/ui.rb @@ -45,9 +45,7 @@ module IRB $stdout.puts line.chomp } when String - str.each_line{|line| - $stdout.puts line.chomp - } + Pager.page_content(str, retain_content: true) when nil $stdout.puts end