Don't break if __FILE__ is relative and backtrace isn't

This commit is contained in:
Ryan Fitzgerald 2013-07-27 16:13:54 -07:00
parent 46288ab002
commit 42db0125ac
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ describe Pry do
describe "a fresh instance" do
it "should use `caller` as its backtrace" do
location = "#{__FILE__}:#{__LINE__ + 1}"
location = "#{__FILE__}:#{__LINE__ + 1}"[1..-1] # omit leading .
backtrace = Pry.new.backtrace
backtrace.should.not.be.nil