From f2168f1793504b6d2d2c3eef9afc7cea4a0ada40 Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Tue, 1 Jan 2013 03:40:36 -0600 Subject: [PATCH] Make pryrc load errors more useful. --- lib/pry/pry_class.rb | 2 +- spec/pry_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 6f87cd57..242193d5 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -69,7 +69,7 @@ class Pry begin toplevel_binding.eval(File.read(full_name), full_name) if File.exists?(full_name) rescue RescuableException => e - puts "Error loading #{file_name}: #{e}" + puts "Error loading #{file_name}: #{e}\n#{e.backtrace.first}" end end diff --git a/spec/pry_spec.rb b/spec/pry_spec.rb index d22b0f57..3711082b 100644 --- a/spec/pry_spec.rb +++ b/spec/pry_spec.rb @@ -390,7 +390,7 @@ describe Pry do end it "should output an error" do - @doing_it.call.should == + @doing_it.call.split("\n").first.should == "Error loading spec/fixtures/testrcbad: messin with ya" end end