From a090810f4cb06eb8f66d6272beed9713148a0063 Mon Sep 17 00:00:00 2001
From: John Mair <jrmair@gmail.com>
Date: Sun, 11 Dec 2011 21:33:33 +1300
Subject: [PATCH] added text.no_pager method to turn off paging for the
 duration of a block

---
 lib/pry/helpers/text.rb | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/pry/helpers/text.rb b/lib/pry/helpers/text.rb
index 10c416d6..ea27d327 100644
--- a/lib/pry/helpers/text.rb
+++ b/lib/pry/helpers/text.rb
@@ -61,11 +61,23 @@ class Pry
         # @param [Proc]
         # @return [void]
         def no_color &block
-          boolean = Pry.color
-          Pry.color = false
+          boolean = Pry.config.color
+          Pry.config.color = false
           yield
         ensure
-          Pry.color = boolean
+          Pry.config.color = boolean
+        end
+
+        # Executes _block_ with _Pry.config.pager_ set to false.
+        #
+        # @param [Proc]
+        # @return [void]
+        def no_pager &block
+          boolean = Pry.config.pager
+          Pry.config.pager = false
+          yield
+        ensure
+          Pry.config.pager = boolean
         end
 
         # Returns _text_ in a numbered list, beginning at _offset_.