diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 47dc0085..9429d2d8 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -263,12 +263,12 @@ class Pry # serialize something in the user's program, let's not assume we can serialize # the exception either. begin - output.puts "output error: #{e.inspect}" + output.puts "(pry) output error: #{e.inspect}" rescue RescuableException => e if last_result_is_exception? - output.puts "output error: failed to show exception" + output.puts "(pry) output error: failed to show exception" else - output.puts "output error: failed to show result" + output.puts "(pry) output error: failed to show result" end end end diff --git a/test/test_pry_output.rb b/test/test_pry_output.rb index 1de06d37..b3e371be 100644 --- a/test/test_pry_output.rb +++ b/test/test_pry_output.rb @@ -16,7 +16,7 @@ describe Pry do it "should display serialization exceptions" do Pry.config.print = lambda { |*a| raise "catch-22" } - mock_pry("1").should =~ /output error: #/ + mock_pry("1").should =~ /\(pry\) output error: #/ end it "should catch errors serializing exceptions" do @@ -24,7 +24,7 @@ describe Pry do raise Exception.new("catch-22").tap{ |e| class << e; def inspect; raise e; end; end } end - mock_pry("1").should =~ /output error: failed to show result/ + mock_pry("1").should =~ /\(pry\) output error: failed to show result/ end end