summaryrefslogtreecommitdiff
path: root/spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb
blob: 33c8fb36ef00ab3ee918e86fb05f437ae5660319 (plain)
1
2
3
4
5
6
7
8
9
10
11
puts __FILE__
puts __dir__
Dir.chdir __dir__

# Check __dir__ is still correct after chdir
puts __dir__

puts caller_locations(0)[0].absolute_path

# require_relative also needs to know the absolute path of the current file so we test it here too
require_relative 'sibling'