From: Debian Ruby Extras Maintainers
 <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Date: Wed, 30 Aug 2017 15:51:40 +0900
Subject: dont-try-to-write-outside-build-dir
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Bug-Debian: https://bugs.debian.org/759900
Forwarded: not-needed
Author: David Suárez <david.sephirot@gmail.com>
Last-Update: 2014-09-24
---
 spec/integration/readline_spec.rb | 4 ++++
 1 file changed, 4 insertions(+)

Index: pry/spec/integration/readline_spec.rb
===================================================================
--- pry.orig/spec/integration/readline_spec.rb
+++ pry/spec/integration/readline_spec.rb
@@ -21,19 +21,23 @@ describe "Readline" do
   it "is loaded on invoking 'pry'" do
     code = <<-RUBY
       require "pry"
+      Pry.config.history.file = "pry_history"
       Pry.start self, input: StringIO.new("exit-all"), output: StringIO.new
       puts defined?(Readline)
     RUBY
     expect(`#@ruby -I #@pry_dir -e '#{code}'`.end_with?("constant\n")).to eq(true)
+    File.delete "pry_history"
   end
 
   it "is not loaded on invoking 'pry' if Pry.input is set" do
     code = <<-RUBY
       require "pry"
+      Pry.config.history.file = "pry_history"
       Pry.input = StringIO.new("exit-all")
       Pry.start self, output: StringIO.new
       p defined?(Readline)
     RUBY
     expect(`#@ruby -I #@pry_dir -e '#{code}'`.end_with?("nil\n")).to eq(true)
+    File.delete "pry_history"
   end
 end
