diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-10-24 15:52:37 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-10-24 15:53:53 +0200 |
commit | 148961adcd0704d964fce920330a6301b9704c25 (patch) | |
tree | 1f1f0cb7326775788683c77f0e2cceb495d3cc95 /spec/ruby/core/thread | |
parent | 342fbae83c2e80d1b49656bc7c689cc7fe8980ce (diff) | |
download | ruby-148961adcd0704d964fce920330a6301b9704c25.tar.gz |
Update to ruby/spec@4f59d86
Diffstat (limited to 'spec/ruby/core/thread')
-rw-r--r-- | spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb b/spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb index 90839baa0f..b0ae28beee 100644 --- a/spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb +++ b/spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb @@ -36,6 +36,19 @@ describe 'Thread::Backtrace::Location#absolute_path' do end end + context "when used in a core method" do + it "returns nil" do + location = nil + tap { location = caller_locations(1, 1)[0] } + location.label.should == "tap" + if location.path.start_with?("<internal:") + location.absolute_path.should == nil + else + location.absolute_path.should == File.realpath(__FILE__) + end + end + end + context "canonicalization" do platform_is_not :windows do before :each do |