aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-12-05 16:32:09 +0000
committergit <svn-admin@ruby-lang.org>2023-12-05 16:32:13 +0000
commitf55746a93d48a3ee1fdfacba3716457fabea150a (patch)
tree3032fec1344d098df16a25af6b57a7067cc4f2bb /lib
parentef387e67307504f41baf45a5b06a10eb82933788 (diff)
downloadruby-f55746a93d48a3ee1fdfacba3716457fabea150a.tar.gz
[ruby/irb] Disable pager when TERM is not set too
(https://github.com/ruby/irb/pull/802) https://github.com/ruby/irb/commit/173980974b
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/pager.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/pager.rb b/lib/irb/pager.rb
index d503487865..3391b32c66 100644
--- a/lib/irb/pager.rb
+++ b/lib/irb/pager.rb
@@ -41,7 +41,7 @@ module IRB
private
def should_page?
- IRB.conf[:USE_PAGER] && STDIN.tty? && ENV["TERM"] != "dumb"
+ IRB.conf[:USE_PAGER] && STDIN.tty? && (ENV.key?("TERM") && ENV["TERM"] != "dumb")
end
def content_exceeds_screen_height?(content)