[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.

8241ec9a0c
This commit is contained in:
Stan Lo 2024-12-11 19:30:30 +08:00 committed by git
parent f9601903f6
commit 2335ecb7fa

View file

@ -45,9 +45,7 @@ module IRB
$stdout.puts line.chomp $stdout.puts line.chomp
} }
when String when String
str.each_line{|line| Pager.page_content(str, retain_content: true)
$stdout.puts line.chomp
}
when nil when nil
$stdout.puts $stdout.puts
end end