diff options
Diffstat (limited to 'spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb')
-rw-r--r-- | spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb b/spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb new file mode 100644 index 0000000000..33c8fb36ef --- /dev/null +++ b/spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb @@ -0,0 +1,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' |