summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2024-12-11 19:30:30 +0800
committergit <[email protected]>2024-12-11 11:30:36 +0000
commit2335ecb7fac38f72c8ecedab79fcc2f197249ef3 (patch)
treef34725c2b674d900936c58375b6a202199cfe3c0 /lib
parentf9601903f64e56d95c140074980584c09373b040 (diff)
[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
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/debug/ui.rb4
1 files changed, 1 insertions, 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