summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file')
-rw-r--r--spec/ruby/core/file/absolute_path_spec.rb2
-rw-r--r--spec/ruby/core/file/atime_spec.rb2
-rw-r--r--spec/ruby/core/file/basename_spec.rb2
-rw-r--r--spec/ruby/core/file/birthtime_spec.rb2
-rw-r--r--spec/ruby/core/file/blockdev_spec.rb4
-rw-r--r--spec/ruby/core/file/chardev_spec.rb4
-rw-r--r--spec/ruby/core/file/chmod_spec.rb2
-rw-r--r--spec/ruby/core/file/chown_spec.rb2
-rw-r--r--spec/ruby/core/file/constants/constants_spec.rb2
-rw-r--r--spec/ruby/core/file/constants_spec.rb2
-rw-r--r--spec/ruby/core/file/ctime_spec.rb2
-rw-r--r--spec/ruby/core/file/delete_spec.rb4
-rw-r--r--spec/ruby/core/file/directory_spec.rb4
-rw-r--r--spec/ruby/core/file/dirname_spec.rb2
-rw-r--r--spec/ruby/core/file/empty_spec.rb4
-rw-r--r--spec/ruby/core/file/executable_real_spec.rb4
-rw-r--r--spec/ruby/core/file/executable_spec.rb4
-rw-r--r--spec/ruby/core/file/exist_spec.rb4
-rw-r--r--spec/ruby/core/file/exists_spec.rb4
-rw-r--r--spec/ruby/core/file/expand_path_spec.rb4
-rw-r--r--spec/ruby/core/file/extname_spec.rb2
-rw-r--r--spec/ruby/core/file/file_spec.rb4
-rw-r--r--spec/ruby/core/file/flock_spec.rb2
-rw-r--r--spec/ruby/core/file/fnmatch_spec.rb4
-rw-r--r--spec/ruby/core/file/grpowned_spec.rb4
-rw-r--r--spec/ruby/core/file/identical_spec.rb4
-rw-r--r--spec/ruby/core/file/initialize_spec.rb2
-rw-r--r--spec/ruby/core/file/inspect_spec.rb2
-rw-r--r--spec/ruby/core/file/join_spec.rb2
-rw-r--r--spec/ruby/core/file/lchmod_spec.rb2
-rw-r--r--spec/ruby/core/file/lchown_spec.rb2
-rw-r--r--spec/ruby/core/file/link_spec.rb2
-rw-r--r--spec/ruby/core/file/lstat_spec.rb4
-rw-r--r--spec/ruby/core/file/mkfifo_spec.rb2
-rw-r--r--spec/ruby/core/file/mtime_spec.rb2
-rw-r--r--spec/ruby/core/file/new_spec.rb4
-rw-r--r--spec/ruby/core/file/null_spec.rb2
-rw-r--r--spec/ruby/core/file/open_spec.rb6
-rw-r--r--spec/ruby/core/file/owned_spec.rb4
-rw-r--r--spec/ruby/core/file/path_spec.rb4
-rw-r--r--spec/ruby/core/file/pipe_spec.rb4
-rw-r--r--spec/ruby/core/file/printf_spec.rb4
-rw-r--r--spec/ruby/core/file/read_spec.rb4
-rw-r--r--spec/ruby/core/file/readable_real_spec.rb4
-rw-r--r--spec/ruby/core/file/readable_spec.rb4
-rw-r--r--spec/ruby/core/file/readlink_spec.rb2
-rw-r--r--spec/ruby/core/file/realdirpath_spec.rb2
-rw-r--r--spec/ruby/core/file/realpath_spec.rb2
-rw-r--r--spec/ruby/core/file/rename_spec.rb2
-rw-r--r--spec/ruby/core/file/reopen_spec.rb2
-rw-r--r--spec/ruby/core/file/setgid_spec.rb4
-rw-r--r--spec/ruby/core/file/setuid_spec.rb4
-rw-r--r--spec/ruby/core/file/shared/open.rb2
-rw-r--r--spec/ruby/core/file/shared/read.rb2
-rw-r--r--spec/ruby/core/file/size_spec.rb4
-rw-r--r--spec/ruby/core/file/socket_spec.rb4
-rw-r--r--spec/ruby/core/file/split_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/atime_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/birthtime_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/blksize_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/blockdev_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/blocks_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/chardev_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/comparison_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/ctime_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/dev_major_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/dev_minor_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/dev_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/directory_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/executable_real_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/executable_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/file_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/gid_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/grpowned_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/ino_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/inspect_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/mode_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/mtime_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/new_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/nlink_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/owned_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/pipe_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/rdev_major_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/rdev_minor_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/rdev_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/readable_real_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/readable_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/setgid_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/setuid_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/size_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/socket_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/sticky_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/symlink_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/uid_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/world_readable_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/world_writable_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/writable_real_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/writable_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/zero_spec.rb6
-rw-r--r--spec/ruby/core/file/stat_spec.rb4
-rw-r--r--spec/ruby/core/file/sticky_spec.rb4
-rw-r--r--spec/ruby/core/file/symlink_spec.rb4
-rw-r--r--spec/ruby/core/file/to_path_spec.rb4
-rw-r--r--spec/ruby/core/file/truncate_spec.rb2
-rw-r--r--spec/ruby/core/file/umask_spec.rb2
-rw-r--r--spec/ruby/core/file/unlink_spec.rb4
-rw-r--r--spec/ruby/core/file/utime_spec.rb2
-rw-r--r--spec/ruby/core/file/world_readable_spec.rb4
-rw-r--r--spec/ruby/core/file/world_writable_spec.rb4
-rw-r--r--spec/ruby/core/file/writable_real_spec.rb4
-rw-r--r--spec/ruby/core/file/writable_spec.rb4
-rw-r--r--spec/ruby/core/file/zero_spec.rb4
112 files changed, 195 insertions, 195 deletions
diff --git a/spec/ruby/core/file/absolute_path_spec.rb b/spec/ruby/core/file/absolute_path_spec.rb
index b1f4f05aee..d6f3f060c7 100644
--- a/spec/ruby/core/file/absolute_path_spec.rb
+++ b/spec/ruby/core/file/absolute_path_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.absolute_path" do
before :each do
diff --git a/spec/ruby/core/file/atime_spec.rb b/spec/ruby/core/file/atime_spec.rb
index 76e7fbd62a..d4106c0411 100644
--- a/spec/ruby/core/file/atime_spec.rb
+++ b/spec/ruby/core/file/atime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.atime" do
before :each do
diff --git a/spec/ruby/core/file/basename_spec.rb b/spec/ruby/core/file/basename_spec.rb
index 4cf26062d3..671955302a 100644
--- a/spec/ruby/core/file/basename_spec.rb
+++ b/spec/ruby/core/file/basename_spec.rb
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
# TODO: Fix these
describe "File.basename" do
diff --git a/spec/ruby/core/file/birthtime_spec.rb b/spec/ruby/core/file/birthtime_spec.rb
index 9720ede834..d263fe5bf1 100644
--- a/spec/ruby/core/file/birthtime_spec.rb
+++ b/spec/ruby/core/file/birthtime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.birthtime" do
before :each do
diff --git a/spec/ruby/core/file/blockdev_spec.rb b/spec/ruby/core/file/blockdev_spec.rb
index f5e03d1ade..9ba9afc251 100644
--- a/spec/ruby/core/file/blockdev_spec.rb
+++ b/spec/ruby/core/file/blockdev_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/blockdev', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/blockdev'
describe "File.blockdev?" do
it_behaves_like :file_blockdev, :blockdev?, File
diff --git a/spec/ruby/core/file/chardev_spec.rb b/spec/ruby/core/file/chardev_spec.rb
index 963823a206..1fc932ee4e 100644
--- a/spec/ruby/core/file/chardev_spec.rb
+++ b/spec/ruby/core/file/chardev_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/chardev', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/chardev'
describe "File.chardev?" do
it_behaves_like :file_chardev, :chardev?, File
diff --git a/spec/ruby/core/file/chmod_spec.rb b/spec/ruby/core/file/chmod_spec.rb
index d98f997d4c..6c4e1099e3 100644
--- a/spec/ruby/core/file/chmod_spec.rb
+++ b/spec/ruby/core/file/chmod_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File#chmod" do
before :each do
diff --git a/spec/ruby/core/file/chown_spec.rb b/spec/ruby/core/file/chown_spec.rb
index 6266e12bfd..8660534825 100644
--- a/spec/ruby/core/file/chown_spec.rb
+++ b/spec/ruby/core/file/chown_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.chown" do
before :each do
diff --git a/spec/ruby/core/file/constants/constants_spec.rb b/spec/ruby/core/file/constants/constants_spec.rb
index 3b2f67cc30..86946822c5 100644
--- a/spec/ruby/core/file/constants/constants_spec.rb
+++ b/spec/ruby/core/file/constants/constants_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
["APPEND", "CREAT", "EXCL", "FNM_CASEFOLD",
"FNM_DOTMATCH", "FNM_EXTGLOB", "FNM_NOESCAPE", "FNM_PATHNAME",
diff --git a/spec/ruby/core/file/constants_spec.rb b/spec/ruby/core/file/constants_spec.rb
index 0379149a18..5f058a7f40 100644
--- a/spec/ruby/core/file/constants_spec.rb
+++ b/spec/ruby/core/file/constants_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
# TODO: migrate these to constants/constants_spec.rb
diff --git a/spec/ruby/core/file/ctime_spec.rb b/spec/ruby/core/file/ctime_spec.rb
index c39775fcdd..50ffbe6a79 100644
--- a/spec/ruby/core/file/ctime_spec.rb
+++ b/spec/ruby/core/file/ctime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.ctime" do
before :each do
diff --git a/spec/ruby/core/file/delete_spec.rb b/spec/ruby/core/file/delete_spec.rb
index 9c4bf33c48..4098499942 100644
--- a/spec/ruby/core/file/delete_spec.rb
+++ b/spec/ruby/core/file/delete_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/unlink', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/unlink'
describe "File.delete" do
it_behaves_like :file_unlink, :delete
diff --git a/spec/ruby/core/file/directory_spec.rb b/spec/ruby/core/file/directory_spec.rb
index d8e8b25121..8014a7a03d 100644
--- a/spec/ruby/core/file/directory_spec.rb
+++ b/spec/ruby/core/file/directory_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/directory', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/directory'
describe "File.directory?" do
it_behaves_like :file_directory, :directory?, File
diff --git a/spec/ruby/core/file/dirname_spec.rb b/spec/ruby/core/file/dirname_spec.rb
index f56f0806df..0447a4e471 100644
--- a/spec/ruby/core/file/dirname_spec.rb
+++ b/spec/ruby/core/file/dirname_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.dirname" do
it "returns all the components of filename except the last one" do
diff --git a/spec/ruby/core/file/empty_spec.rb b/spec/ruby/core/file/empty_spec.rb
index 766aa95e46..a904f140e6 100644
--- a/spec/ruby/core/file/empty_spec.rb
+++ b/spec/ruby/core/file/empty_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/zero', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/zero'
describe "File.empty?" do
ruby_version_is "2.4" do
diff --git a/spec/ruby/core/file/executable_real_spec.rb b/spec/ruby/core/file/executable_real_spec.rb
index 24d6824169..0cb848b201 100644
--- a/spec/ruby/core/file/executable_real_spec.rb
+++ b/spec/ruby/core/file/executable_real_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/executable_real', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/executable_real'
describe "File.executable_real?" do
it_behaves_like :file_executable_real, :executable_real?, File
diff --git a/spec/ruby/core/file/executable_spec.rb b/spec/ruby/core/file/executable_spec.rb
index 82d6a81a0d..1dbb3b233d 100644
--- a/spec/ruby/core/file/executable_spec.rb
+++ b/spec/ruby/core/file/executable_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/executable', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/executable'
describe "File.executable?" do
it_behaves_like :file_executable, :executable?, File
diff --git a/spec/ruby/core/file/exist_spec.rb b/spec/ruby/core/file/exist_spec.rb
index 0ca6b87ff4..ddb5febcba 100644
--- a/spec/ruby/core/file/exist_spec.rb
+++ b/spec/ruby/core/file/exist_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/exist', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/exist'
describe "File.exist?" do
it_behaves_like :file_exist, :exist?, File
diff --git a/spec/ruby/core/file/exists_spec.rb b/spec/ruby/core/file/exists_spec.rb
index ee5d564112..31d0e4dd1e 100644
--- a/spec/ruby/core/file/exists_spec.rb
+++ b/spec/ruby/core/file/exists_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/exist', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/exist'
describe "File.exists?" do
it_behaves_like :file_exist, :exists?, File
diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb
index c57f323c4c..9d08cbb02b 100644
--- a/spec/ruby/core/file/expand_path_spec.rb
+++ b/spec/ruby/core/file/expand_path_spec.rb
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/common', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/common'
describe "File.expand_path" do
before :each do
diff --git a/spec/ruby/core/file/extname_spec.rb b/spec/ruby/core/file/extname_spec.rb
index fedd4fc89f..1513b30e90 100644
--- a/spec/ruby/core/file/extname_spec.rb
+++ b/spec/ruby/core/file/extname_spec.rb
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.extname" do
it "returns the extension (the portion of file name in path after the period)." do
diff --git a/spec/ruby/core/file/file_spec.rb b/spec/ruby/core/file/file_spec.rb
index 99eaacd086..8a9dfd5fe2 100644
--- a/spec/ruby/core/file/file_spec.rb
+++ b/spec/ruby/core/file/file_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/file', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/file'
describe "File" do
it "includes Enumerable" do
diff --git a/spec/ruby/core/file/flock_spec.rb b/spec/ruby/core/file/flock_spec.rb
index e14d4252d4..6990915a65 100644
--- a/spec/ruby/core/file/flock_spec.rb
+++ b/spec/ruby/core/file/flock_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File#flock" do
before :each do
diff --git a/spec/ruby/core/file/fnmatch_spec.rb b/spec/ruby/core/file/fnmatch_spec.rb
index a2287ffcdb..a1b7fa12b3 100644
--- a/spec/ruby/core/file/fnmatch_spec.rb
+++ b/spec/ruby/core/file/fnmatch_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/fnmatch', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/fnmatch'
describe "File.fnmatch" do
it_behaves_like :file_fnmatch, :fnmatch
diff --git a/spec/ruby/core/file/grpowned_spec.rb b/spec/ruby/core/file/grpowned_spec.rb
index 0b5514d7ca..8ddac5237c 100644
--- a/spec/ruby/core/file/grpowned_spec.rb
+++ b/spec/ruby/core/file/grpowned_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/grpowned', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/grpowned'
describe "File.grpowned?" do
it_behaves_like :file_grpowned, :grpowned?, File
diff --git a/spec/ruby/core/file/identical_spec.rb b/spec/ruby/core/file/identical_spec.rb
index 303337b62d..bbeaef24d2 100644
--- a/spec/ruby/core/file/identical_spec.rb
+++ b/spec/ruby/core/file/identical_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/identical', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/identical'
describe "File.identical?" do
it_behaves_like :file_identical, :identical?, File
diff --git a/spec/ruby/core/file/initialize_spec.rb b/spec/ruby/core/file/initialize_spec.rb
index 269e13b3ca..00e2228031 100644
--- a/spec/ruby/core/file/initialize_spec.rb
+++ b/spec/ruby/core/file/initialize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File#initialize" do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/core/file/inspect_spec.rb b/spec/ruby/core/file/inspect_spec.rb
index a059fa2c48..148e789c62 100644
--- a/spec/ruby/core/file/inspect_spec.rb
+++ b/spec/ruby/core/file/inspect_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File#inspect" do
before :each do
diff --git a/spec/ruby/core/file/join_spec.rb b/spec/ruby/core/file/join_spec.rb
index 7c5955d03b..333b566c3d 100644
--- a/spec/ruby/core/file/join_spec.rb
+++ b/spec/ruby/core/file/join_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.join" do
# see [ruby-core:46804] for the 4 following rules
diff --git a/spec/ruby/core/file/lchmod_spec.rb b/spec/ruby/core/file/lchmod_spec.rb
index 2ce265841e..7be09a05ef 100644
--- a/spec/ruby/core/file/lchmod_spec.rb
+++ b/spec/ruby/core/file/lchmod_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.lchmod" do
platform_is_not :linux, :windows, :openbsd, :solaris, :aix do
diff --git a/spec/ruby/core/file/lchown_spec.rb b/spec/ruby/core/file/lchown_spec.rb
index 814b0bf534..7889d68559 100644
--- a/spec/ruby/core/file/lchown_spec.rb
+++ b/spec/ruby/core/file/lchown_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
as_superuser do
describe "File.lchown" do
diff --git a/spec/ruby/core/file/link_spec.rb b/spec/ruby/core/file/link_spec.rb
index 69d1459672..4e186c6076 100644
--- a/spec/ruby/core/file/link_spec.rb
+++ b/spec/ruby/core/file/link_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.link" do
before :each do
diff --git a/spec/ruby/core/file/lstat_spec.rb b/spec/ruby/core/file/lstat_spec.rb
index 6657bfa00e..918ed02163 100644
--- a/spec/ruby/core/file/lstat_spec.rb
+++ b/spec/ruby/core/file/lstat_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/stat', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/stat'
describe "File.lstat" do
it_behaves_like :file_stat, :lstat
diff --git a/spec/ruby/core/file/mkfifo_spec.rb b/spec/ruby/core/file/mkfifo_spec.rb
index ad6e804b99..f8842418af 100644
--- a/spec/ruby/core/file/mkfifo_spec.rb
+++ b/spec/ruby/core/file/mkfifo_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
ruby_version_is "2.3" do
describe "File.mkfifo" do
diff --git a/spec/ruby/core/file/mtime_spec.rb b/spec/ruby/core/file/mtime_spec.rb
index 56b7e4464e..4c26cb5dac 100644
--- a/spec/ruby/core/file/mtime_spec.rb
+++ b/spec/ruby/core/file/mtime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.mtime" do
before :each do
diff --git a/spec/ruby/core/file/new_spec.rb b/spec/ruby/core/file/new_spec.rb
index 3c72ac48e5..815ecd9d36 100644
--- a/spec/ruby/core/file/new_spec.rb
+++ b/spec/ruby/core/file/new_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/open', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/open'
describe "File.new" do
before :each do
diff --git a/spec/ruby/core/file/null_spec.rb b/spec/ruby/core/file/null_spec.rb
index b9dd6b658b..355b72b799 100644
--- a/spec/ruby/core/file/null_spec.rb
+++ b/spec/ruby/core/file/null_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File::NULL" do
platform_is :windows do
diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb
index 3b2ae60489..b5add5dff4 100644
--- a/spec/ruby/core/file/open_spec.rb
+++ b/spec/ruby/core/file/open_spec.rb
@@ -1,8 +1,8 @@
# encoding: utf-8
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/common', __FILE__)
-require File.expand_path('../shared/open', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/common'
+require_relative 'shared/open'
describe "File.open" do
before :all do
diff --git a/spec/ruby/core/file/owned_spec.rb b/spec/ruby/core/file/owned_spec.rb
index c2d8a74b49..06d6796da9 100644
--- a/spec/ruby/core/file/owned_spec.rb
+++ b/spec/ruby/core/file/owned_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/owned', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/owned'
describe "File.owned?" do
it_behaves_like :file_owned, :owned?, File
diff --git a/spec/ruby/core/file/path_spec.rb b/spec/ruby/core/file/path_spec.rb
index 7a613a757f..dfa0c4ec02 100644
--- a/spec/ruby/core/file/path_spec.rb
+++ b/spec/ruby/core/file/path_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/path', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/path'
describe "File#path" do
it_behaves_like :file_path, :path
diff --git a/spec/ruby/core/file/pipe_spec.rb b/spec/ruby/core/file/pipe_spec.rb
index ca7392b8ee..64e6fce09a 100644
--- a/spec/ruby/core/file/pipe_spec.rb
+++ b/spec/ruby/core/file/pipe_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/pipe', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/pipe'
describe "File.pipe?" do
it_behaves_like :file_pipe, :pipe?, File
diff --git a/spec/ruby/core/file/printf_spec.rb b/spec/ruby/core/file/printf_spec.rb
index 8423c010ab..95ce3589c5 100644
--- a/spec/ruby/core/file/printf_spec.rb
+++ b/spec/ruby/core/file/printf_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../kernel/shared/sprintf', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../kernel/shared/sprintf'
describe "File#printf" do
it_behaves_like :kernel_sprintf, -> (format, *args) {
diff --git a/spec/ruby/core/file/read_spec.rb b/spec/ruby/core/file/read_spec.rb
index fdbbf58a1c..67a3325cbd 100644
--- a/spec/ruby/core/file/read_spec.rb
+++ b/spec/ruby/core/file/read_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/read', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/read'
describe "File.read" do
it_behaves_like :file_read_directory, :read, File
diff --git a/spec/ruby/core/file/readable_real_spec.rb b/spec/ruby/core/file/readable_real_spec.rb
index 5fca968611..524466cd96 100644
--- a/spec/ruby/core/file/readable_real_spec.rb
+++ b/spec/ruby/core/file/readable_real_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/readable_real', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/readable_real'
describe "File.readable_real?" do
it_behaves_like :file_readable_real, :readable_real?, File
diff --git a/spec/ruby/core/file/readable_spec.rb b/spec/ruby/core/file/readable_spec.rb
index 3307e5e30f..ed75a23f39 100644
--- a/spec/ruby/core/file/readable_spec.rb
+++ b/spec/ruby/core/file/readable_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/readable', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/readable'
describe "File.readable?" do
it_behaves_like :file_readable, :readable?, File
diff --git a/spec/ruby/core/file/readlink_spec.rb b/spec/ruby/core/file/readlink_spec.rb
index b529cd1355..7b1fe74047 100644
--- a/spec/ruby/core/file/readlink_spec.rb
+++ b/spec/ruby/core/file/readlink_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.readlink" do
# symlink/readlink are not supported on Windows
diff --git a/spec/ruby/core/file/realdirpath_spec.rb b/spec/ruby/core/file/realdirpath_spec.rb
index 06900ad461..9c90d7330f 100644
--- a/spec/ruby/core/file/realdirpath_spec.rb
+++ b/spec/ruby/core/file/realdirpath_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
platform_is_not :windows do
describe "File.realdirpath" do
diff --git a/spec/ruby/core/file/realpath_spec.rb b/spec/ruby/core/file/realpath_spec.rb
index 49aed7b88c..d7bb842759 100644
--- a/spec/ruby/core/file/realpath_spec.rb
+++ b/spec/ruby/core/file/realpath_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
platform_is_not :windows do
describe "File.realpath" do
diff --git a/spec/ruby/core/file/rename_spec.rb b/spec/ruby/core/file/rename_spec.rb
index a62ba809bd..5f47000d38 100644
--- a/spec/ruby/core/file/rename_spec.rb
+++ b/spec/ruby/core/file/rename_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.rename" do
before :each do
diff --git a/spec/ruby/core/file/reopen_spec.rb b/spec/ruby/core/file/reopen_spec.rb
index 2493829740..2d79129320 100644
--- a/spec/ruby/core/file/reopen_spec.rb
+++ b/spec/ruby/core/file/reopen_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File#reopen" do
before :each do
diff --git a/spec/ruby/core/file/setgid_spec.rb b/spec/ruby/core/file/setgid_spec.rb
index dc63329cc3..f5df5390f5 100644
--- a/spec/ruby/core/file/setgid_spec.rb
+++ b/spec/ruby/core/file/setgid_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/setgid', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/setgid'
describe "File.setgid?" do
it_behaves_like :file_setgid, :setgid?, File
diff --git a/spec/ruby/core/file/setuid_spec.rb b/spec/ruby/core/file/setuid_spec.rb
index dcd1d3aed1..281ef01ab9 100644
--- a/spec/ruby/core/file/setuid_spec.rb
+++ b/spec/ruby/core/file/setuid_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/setuid', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/setuid'
describe "File.setuid?" do
it_behaves_like :file_setuid, :setuid?, File
diff --git a/spec/ruby/core/file/shared/open.rb b/spec/ruby/core/file/shared/open.rb
index 0ca1bc74db..677a82a351 100644
--- a/spec/ruby/core/file/shared/open.rb
+++ b/spec/ruby/core/file/shared/open.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../dir/fixtures/common', __FILE__)
+require_relative '../../dir/fixtures/common'
describe :open_directory, shared: true do
it "opens directories" do
diff --git a/spec/ruby/core/file/shared/read.rb b/spec/ruby/core/file/shared/read.rb
index e37523c244..7fff7f29d6 100644
--- a/spec/ruby/core/file/shared/read.rb
+++ b/spec/ruby/core/file/shared/read.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../dir/fixtures/common', __FILE__)
+require_relative '../../dir/fixtures/common'
describe :file_read_directory, shared: true do
platform_is :darwin, :linux, :openbsd, :windows do
diff --git a/spec/ruby/core/file/size_spec.rb b/spec/ruby/core/file/size_spec.rb
index 73c8192b18..b0ab2c0651 100644
--- a/spec/ruby/core/file/size_spec.rb
+++ b/spec/ruby/core/file/size_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/size', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/size'
describe "File.size?" do
it_behaves_like :file_size, :size?, File
diff --git a/spec/ruby/core/file/socket_spec.rb b/spec/ruby/core/file/socket_spec.rb
index 80f33f4b19..5d12e21f55 100644
--- a/spec/ruby/core/file/socket_spec.rb
+++ b/spec/ruby/core/file/socket_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/socket', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/socket'
require 'socket'
describe "File.socket?" do
diff --git a/spec/ruby/core/file/split_spec.rb b/spec/ruby/core/file/split_spec.rb
index 2479d4b949..7a345e8891 100644
--- a/spec/ruby/core/file/split_spec.rb
+++ b/spec/ruby/core/file/split_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.split" do
before :each do
diff --git a/spec/ruby/core/file/stat/atime_spec.rb b/spec/ruby/core/file/stat/atime_spec.rb
index 575c98ce44..9f1111ced1 100644
--- a/spec/ruby/core/file/stat/atime_spec.rb
+++ b/spec/ruby/core/file/stat/atime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#atime" do
before :each do
diff --git a/spec/ruby/core/file/stat/birthtime_spec.rb b/spec/ruby/core/file/stat/birthtime_spec.rb
index c2ccc319f1..40e501e87b 100644
--- a/spec/ruby/core/file/stat/birthtime_spec.rb
+++ b/spec/ruby/core/file/stat/birthtime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#birthtime" do
before :each do
diff --git a/spec/ruby/core/file/stat/blksize_spec.rb b/spec/ruby/core/file/stat/blksize_spec.rb
index 4399e6b4bb..4d85b05e4d 100644
--- a/spec/ruby/core/file/stat/blksize_spec.rb
+++ b/spec/ruby/core/file/stat/blksize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#blksize" do
before :each do
diff --git a/spec/ruby/core/file/stat/blockdev_spec.rb b/spec/ruby/core/file/stat/blockdev_spec.rb
index 440291f130..f986c18125 100644
--- a/spec/ruby/core/file/stat/blockdev_spec.rb
+++ b/spec/ruby/core/file/stat/blockdev_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/blockdev', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/blockdev'
+require_relative 'fixtures/classes'
describe "File::Stat#blockdev?" do
it_behaves_like :file_blockdev, :blockdev?, FileStat
diff --git a/spec/ruby/core/file/stat/blocks_spec.rb b/spec/ruby/core/file/stat/blocks_spec.rb
index e84e822a27..f3f903d0f7 100644
--- a/spec/ruby/core/file/stat/blocks_spec.rb
+++ b/spec/ruby/core/file/stat/blocks_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#blocks" do
before :each do
diff --git a/spec/ruby/core/file/stat/chardev_spec.rb b/spec/ruby/core/file/stat/chardev_spec.rb
index 25c8c877f7..622fb2052d 100644
--- a/spec/ruby/core/file/stat/chardev_spec.rb
+++ b/spec/ruby/core/file/stat/chardev_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/chardev', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/chardev'
+require_relative 'fixtures/classes'
describe "File::Stat#chardev?" do
it_behaves_like :file_chardev, :chardev?, FileStat
diff --git a/spec/ruby/core/file/stat/comparison_spec.rb b/spec/ruby/core/file/stat/comparison_spec.rb
index a70a083ab2..faa3b6bf62 100644
--- a/spec/ruby/core/file/stat/comparison_spec.rb
+++ b/spec/ruby/core/file/stat/comparison_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#<=>" do
before :each do
diff --git a/spec/ruby/core/file/stat/ctime_spec.rb b/spec/ruby/core/file/stat/ctime_spec.rb
index 2f82dfdab6..fd50487a0a 100644
--- a/spec/ruby/core/file/stat/ctime_spec.rb
+++ b/spec/ruby/core/file/stat/ctime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#ctime" do
before :each do
diff --git a/spec/ruby/core/file/stat/dev_major_spec.rb b/spec/ruby/core/file/stat/dev_major_spec.rb
index 0b00fc4d36..4966d609e2 100644
--- a/spec/ruby/core/file/stat/dev_major_spec.rb
+++ b/spec/ruby/core/file/stat/dev_major_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#dev_major" do
before :each do
diff --git a/spec/ruby/core/file/stat/dev_minor_spec.rb b/spec/ruby/core/file/stat/dev_minor_spec.rb
index 0475e3be81..ea79c12b99 100644
--- a/spec/ruby/core/file/stat/dev_minor_spec.rb
+++ b/spec/ruby/core/file/stat/dev_minor_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#dev_minor" do
before :each do
diff --git a/spec/ruby/core/file/stat/dev_spec.rb b/spec/ruby/core/file/stat/dev_spec.rb
index 3cdc704fd7..e953fcaa58 100644
--- a/spec/ruby/core/file/stat/dev_spec.rb
+++ b/spec/ruby/core/file/stat/dev_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#dev" do
before :each do
diff --git a/spec/ruby/core/file/stat/directory_spec.rb b/spec/ruby/core/file/stat/directory_spec.rb
index 5ead2dca49..c03610388b 100644
--- a/spec/ruby/core/file/stat/directory_spec.rb
+++ b/spec/ruby/core/file/stat/directory_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/directory', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/directory'
+require_relative 'fixtures/classes'
describe "File::Stat#directory?" do
it_behaves_like :file_directory, :directory?, FileStat
diff --git a/spec/ruby/core/file/stat/executable_real_spec.rb b/spec/ruby/core/file/stat/executable_real_spec.rb
index 11de0a5b39..23bffe89c5 100644
--- a/spec/ruby/core/file/stat/executable_real_spec.rb
+++ b/spec/ruby/core/file/stat/executable_real_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/executable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/executable_real'
+require_relative 'fixtures/classes'
describe "File::Stat#executable_real?" do
it_behaves_like :file_executable_real, :executable_real?, FileStat
diff --git a/spec/ruby/core/file/stat/executable_spec.rb b/spec/ruby/core/file/stat/executable_spec.rb
index e3b1093056..422975d14b 100644
--- a/spec/ruby/core/file/stat/executable_spec.rb
+++ b/spec/ruby/core/file/stat/executable_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/executable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/executable'
+require_relative 'fixtures/classes'
describe "File::Stat#executable?" do
it_behaves_like :file_executable, :executable?, FileStat
diff --git a/spec/ruby/core/file/stat/file_spec.rb b/spec/ruby/core/file/stat/file_spec.rb
index da79dddb00..d141536b4b 100644
--- a/spec/ruby/core/file/stat/file_spec.rb
+++ b/spec/ruby/core/file/stat/file_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/file', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/file'
+require_relative 'fixtures/classes'
describe "File::Stat#file?" do
it_behaves_like :file_file, :file?, FileStat
diff --git a/spec/ruby/core/file/stat/gid_spec.rb b/spec/ruby/core/file/stat/gid_spec.rb
index 27356b6401..3bba65bc82 100644
--- a/spec/ruby/core/file/stat/gid_spec.rb
+++ b/spec/ruby/core/file/stat/gid_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#gid" do
before :each do
diff --git a/spec/ruby/core/file/stat/grpowned_spec.rb b/spec/ruby/core/file/stat/grpowned_spec.rb
index 07a52876d0..e7278e229b 100644
--- a/spec/ruby/core/file/stat/grpowned_spec.rb
+++ b/spec/ruby/core/file/stat/grpowned_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/grpowned', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/grpowned'
+require_relative 'fixtures/classes'
describe "File::Stat#grpowned?" do
it_behaves_like :file_grpowned, :grpowned?, FileStat
diff --git a/spec/ruby/core/file/stat/ino_spec.rb b/spec/ruby/core/file/stat/ino_spec.rb
index 0339dee54f..3ae2a7d439 100644
--- a/spec/ruby/core/file/stat/ino_spec.rb
+++ b/spec/ruby/core/file/stat/ino_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#ino" do
before :each do
diff --git a/spec/ruby/core/file/stat/inspect_spec.rb b/spec/ruby/core/file/stat/inspect_spec.rb
index ec99ab16a8..b0a0658dc0 100644
--- a/spec/ruby/core/file/stat/inspect_spec.rb
+++ b/spec/ruby/core/file/stat/inspect_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#inspect" do
diff --git a/spec/ruby/core/file/stat/mode_spec.rb b/spec/ruby/core/file/stat/mode_spec.rb
index 1c895bf0ce..c85fb85a58 100644
--- a/spec/ruby/core/file/stat/mode_spec.rb
+++ b/spec/ruby/core/file/stat/mode_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#mode" do
before :each do
diff --git a/spec/ruby/core/file/stat/mtime_spec.rb b/spec/ruby/core/file/stat/mtime_spec.rb
index 9dd20dfd65..08a2b83463 100644
--- a/spec/ruby/core/file/stat/mtime_spec.rb
+++ b/spec/ruby/core/file/stat/mtime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#mtime" do
before :each do
diff --git a/spec/ruby/core/file/stat/new_spec.rb b/spec/ruby/core/file/stat/new_spec.rb
index 4579c4a807..f5f22e6711 100644
--- a/spec/ruby/core/file/stat/new_spec.rb
+++ b/spec/ruby/core/file/stat/new_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#initialize" do
diff --git a/spec/ruby/core/file/stat/nlink_spec.rb b/spec/ruby/core/file/stat/nlink_spec.rb
index e857b07fd1..2dd0bff124 100644
--- a/spec/ruby/core/file/stat/nlink_spec.rb
+++ b/spec/ruby/core/file/stat/nlink_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#nlink" do
before :each do
diff --git a/spec/ruby/core/file/stat/owned_spec.rb b/spec/ruby/core/file/stat/owned_spec.rb
index f321aefe7a..6f0c250f88 100644
--- a/spec/ruby/core/file/stat/owned_spec.rb
+++ b/spec/ruby/core/file/stat/owned_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/owned', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/owned'
+require_relative 'fixtures/classes'
describe "File::Stat#owned?" do
it_behaves_like :file_owned, :owned?, FileStat
diff --git a/spec/ruby/core/file/stat/pipe_spec.rb b/spec/ruby/core/file/stat/pipe_spec.rb
index e4c0b559bb..027b40eaaa 100644
--- a/spec/ruby/core/file/stat/pipe_spec.rb
+++ b/spec/ruby/core/file/stat/pipe_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/pipe', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/pipe'
+require_relative 'fixtures/classes'
describe "File::Stat#pipe?" do
it_behaves_like :file_pipe, :pipe?, FileStat
diff --git a/spec/ruby/core/file/stat/rdev_major_spec.rb b/spec/ruby/core/file/stat/rdev_major_spec.rb
index f9d514fbc0..f8a8d1b107 100644
--- a/spec/ruby/core/file/stat/rdev_major_spec.rb
+++ b/spec/ruby/core/file/stat/rdev_major_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#rdev_major" do
before :each do
diff --git a/spec/ruby/core/file/stat/rdev_minor_spec.rb b/spec/ruby/core/file/stat/rdev_minor_spec.rb
index 67399c5e68..dc30c1f56c 100644
--- a/spec/ruby/core/file/stat/rdev_minor_spec.rb
+++ b/spec/ruby/core/file/stat/rdev_minor_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#rdev_minor" do
before :each do
diff --git a/spec/ruby/core/file/stat/rdev_spec.rb b/spec/ruby/core/file/stat/rdev_spec.rb
index 12f97fb044..9e1aee692d 100644
--- a/spec/ruby/core/file/stat/rdev_spec.rb
+++ b/spec/ruby/core/file/stat/rdev_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#rdev" do
before :each do
diff --git a/spec/ruby/core/file/stat/readable_real_spec.rb b/spec/ruby/core/file/stat/readable_real_spec.rb
index 49412f1df2..f138fd7b00 100644
--- a/spec/ruby/core/file/stat/readable_real_spec.rb
+++ b/spec/ruby/core/file/stat/readable_real_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/readable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/readable_real'
+require_relative 'fixtures/classes'
describe "File::Stat#readable_real?" do
it_behaves_like :file_readable_real, :readable_real?, FileStat
diff --git a/spec/ruby/core/file/stat/readable_spec.rb b/spec/ruby/core/file/stat/readable_spec.rb
index 3d81975309..e99e48feed 100644
--- a/spec/ruby/core/file/stat/readable_spec.rb
+++ b/spec/ruby/core/file/stat/readable_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/readable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/readable'
+require_relative 'fixtures/classes'
describe "File::Stat#readable?" do
it_behaves_like :file_readable, :readable?, FileStat
diff --git a/spec/ruby/core/file/stat/setgid_spec.rb b/spec/ruby/core/file/stat/setgid_spec.rb
index 318a72b437..9b972f5a6d 100644
--- a/spec/ruby/core/file/stat/setgid_spec.rb
+++ b/spec/ruby/core/file/stat/setgid_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/setgid', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/setgid'
+require_relative 'fixtures/classes'
describe "File::Stat#setgid?" do
it_behaves_like :file_setgid, :setgid?, FileStat
diff --git a/spec/ruby/core/file/stat/setuid_spec.rb b/spec/ruby/core/file/stat/setuid_spec.rb
index 5057af0ccc..892776a0ef 100644
--- a/spec/ruby/core/file/stat/setuid_spec.rb
+++ b/spec/ruby/core/file/stat/setuid_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/setuid', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/setuid'
+require_relative 'fixtures/classes'
describe "File::Stat#setuid?" do
it_behaves_like :file_setuid, :setuid?, FileStat
diff --git a/spec/ruby/core/file/stat/size_spec.rb b/spec/ruby/core/file/stat/size_spec.rb
index 84db12d591..4b4f57f8c8 100644
--- a/spec/ruby/core/file/stat/size_spec.rb
+++ b/spec/ruby/core/file/stat/size_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/size', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/size'
+require_relative 'fixtures/classes'
describe "File::Stat.size?" do
it_behaves_like :file_size, :size?, FileStat
diff --git a/spec/ruby/core/file/stat/socket_spec.rb b/spec/ruby/core/file/stat/socket_spec.rb
index b25d9314f9..8dd43ec44a 100644
--- a/spec/ruby/core/file/stat/socket_spec.rb
+++ b/spec/ruby/core/file/stat/socket_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/socket', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/socket'
+require_relative 'fixtures/classes'
describe "File::Stat#socket?" do
it_behaves_like :file_socket, :socket?, FileStat
diff --git a/spec/ruby/core/file/stat/sticky_spec.rb b/spec/ruby/core/file/stat/sticky_spec.rb
index c2fefbe106..8634253a02 100644
--- a/spec/ruby/core/file/stat/sticky_spec.rb
+++ b/spec/ruby/core/file/stat/sticky_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/sticky', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/sticky'
+require_relative 'fixtures/classes'
describe "File::Stat#sticky?" do
it_behaves_like :file_sticky, :sticky?, FileStat
diff --git a/spec/ruby/core/file/stat/symlink_spec.rb b/spec/ruby/core/file/stat/symlink_spec.rb
index 579c1de0ad..0def832a4c 100644
--- a/spec/ruby/core/file/stat/symlink_spec.rb
+++ b/spec/ruby/core/file/stat/symlink_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/symlink', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/symlink'
+require_relative 'fixtures/classes'
describe "File::Stat#symlink?" do
it_behaves_like :file_symlink, :symlink?, FileStat
diff --git a/spec/ruby/core/file/stat/uid_spec.rb b/spec/ruby/core/file/stat/uid_spec.rb
index 75be97c234..b97147db21 100644
--- a/spec/ruby/core/file/stat/uid_spec.rb
+++ b/spec/ruby/core/file/stat/uid_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe "File::Stat#uid" do
before :each do
diff --git a/spec/ruby/core/file/stat/world_readable_spec.rb b/spec/ruby/core/file/stat/world_readable_spec.rb
index e72963c0b8..d94a02205e 100644
--- a/spec/ruby/core/file/stat/world_readable_spec.rb
+++ b/spec/ruby/core/file/stat/world_readable_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/world_readable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/world_readable'
+require_relative 'fixtures/classes'
describe "File::Stat.world_readable?" do
it_behaves_like :file_world_readable, :world_readable?, FileStat
diff --git a/spec/ruby/core/file/stat/world_writable_spec.rb b/spec/ruby/core/file/stat/world_writable_spec.rb
index f532d752dd..8100008344 100644
--- a/spec/ruby/core/file/stat/world_writable_spec.rb
+++ b/spec/ruby/core/file/stat/world_writable_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/world_writable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/world_writable'
+require_relative 'fixtures/classes'
describe "File::Stat.world_writable?" do
it_behaves_like :file_world_writable, :world_writable?, FileStat
diff --git a/spec/ruby/core/file/stat/writable_real_spec.rb b/spec/ruby/core/file/stat/writable_real_spec.rb
index e069db507b..4c9e78eb70 100644
--- a/spec/ruby/core/file/stat/writable_real_spec.rb
+++ b/spec/ruby/core/file/stat/writable_real_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/writable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/writable_real'
+require_relative 'fixtures/classes'
describe "File::Stat#writable_real?" do
it_behaves_like :file_writable_real, :writable_real?, FileStat
diff --git a/spec/ruby/core/file/stat/writable_spec.rb b/spec/ruby/core/file/stat/writable_spec.rb
index b720e59f81..551268751f 100644
--- a/spec/ruby/core/file/stat/writable_spec.rb
+++ b/spec/ruby/core/file/stat/writable_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/writable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/writable'
+require_relative 'fixtures/classes'
describe "File::Stat#writable?" do
it_behaves_like :file_writable, :writable?, FileStat
diff --git a/spec/ruby/core/file/stat/zero_spec.rb b/spec/ruby/core/file/stat/zero_spec.rb
index 127c706b90..74facac66a 100644
--- a/spec/ruby/core/file/stat/zero_spec.rb
+++ b/spec/ruby/core/file/stat/zero_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/zero', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/zero'
+require_relative 'fixtures/classes'
describe "File::Stat#zero?" do
it_behaves_like :file_zero, :zero?, FileStat
diff --git a/spec/ruby/core/file/stat_spec.rb b/spec/ruby/core/file/stat_spec.rb
index 1ea003142e..31f9dc58af 100644
--- a/spec/ruby/core/file/stat_spec.rb
+++ b/spec/ruby/core/file/stat_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/stat', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/stat'
describe "File.stat" do
it_behaves_like :file_stat, :stat
diff --git a/spec/ruby/core/file/sticky_spec.rb b/spec/ruby/core/file/sticky_spec.rb
index d01e2b6818..7805c39f79 100644
--- a/spec/ruby/core/file/sticky_spec.rb
+++ b/spec/ruby/core/file/sticky_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/sticky', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/sticky'
describe "File.sticky?" do
it_behaves_like :file_sticky, :sticky?, File
diff --git a/spec/ruby/core/file/symlink_spec.rb b/spec/ruby/core/file/symlink_spec.rb
index 2426b8c9a7..a8486db04a 100644
--- a/spec/ruby/core/file/symlink_spec.rb
+++ b/spec/ruby/core/file/symlink_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/symlink', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/symlink'
describe "File.symlink" do
before :each do
diff --git a/spec/ruby/core/file/to_path_spec.rb b/spec/ruby/core/file/to_path_spec.rb
index 006011089c..6d168a065c 100644
--- a/spec/ruby/core/file/to_path_spec.rb
+++ b/spec/ruby/core/file/to_path_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/path', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/path'
describe "File#to_path" do
it_behaves_like :file_path, :to_path
diff --git a/spec/ruby/core/file/truncate_spec.rb b/spec/ruby/core/file/truncate_spec.rb
index a120c610b8..36fe26a2fe 100644
--- a/spec/ruby/core/file/truncate_spec.rb
+++ b/spec/ruby/core/file/truncate_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.truncate" do
before :each do
diff --git a/spec/ruby/core/file/umask_spec.rb b/spec/ruby/core/file/umask_spec.rb
index f35357dd03..9a4beb8998 100644
--- a/spec/ruby/core/file/umask_spec.rb
+++ b/spec/ruby/core/file/umask_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.umask" do
before :each do
diff --git a/spec/ruby/core/file/unlink_spec.rb b/spec/ruby/core/file/unlink_spec.rb
index 3e67ebc25d..28872d55ed 100644
--- a/spec/ruby/core/file/unlink_spec.rb
+++ b/spec/ruby/core/file/unlink_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/unlink', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/unlink'
describe "File.unlink" do
it_behaves_like :file_unlink, :unlink
diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb
index 1d9ccd9f71..542681ea93 100644
--- a/spec/ruby/core/file/utime_spec.rb
+++ b/spec/ruby/core/file/utime_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.utime" do
before :each do
diff --git a/spec/ruby/core/file/world_readable_spec.rb b/spec/ruby/core/file/world_readable_spec.rb
index ea0b739fff..7e6c60b65c 100644
--- a/spec/ruby/core/file/world_readable_spec.rb
+++ b/spec/ruby/core/file/world_readable_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/world_readable', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/world_readable'
describe "File.world_readable?" do
it_behaves_like :file_world_readable, :world_readable?, File
diff --git a/spec/ruby/core/file/world_writable_spec.rb b/spec/ruby/core/file/world_writable_spec.rb
index 57aede397c..00333a98ab 100644
--- a/spec/ruby/core/file/world_writable_spec.rb
+++ b/spec/ruby/core/file/world_writable_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/world_writable', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/world_writable'
describe "File.world_writable?" do
it_behaves_like :file_world_writable, :world_writable?, File
diff --git a/spec/ruby/core/file/writable_real_spec.rb b/spec/ruby/core/file/writable_real_spec.rb
index 36f576e222..bea4c4c262 100644
--- a/spec/ruby/core/file/writable_real_spec.rb
+++ b/spec/ruby/core/file/writable_real_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/writable_real', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/writable_real'
describe "File.writable_real?" do
it_behaves_like :file_writable_real, :writable_real?, File
diff --git a/spec/ruby/core/file/writable_spec.rb b/spec/ruby/core/file/writable_spec.rb
index 4f6213ec77..519837b0d1 100644
--- a/spec/ruby/core/file/writable_spec.rb
+++ b/spec/ruby/core/file/writable_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/writable', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/writable'
describe "File.writable?" do
it_behaves_like :file_writable, :writable?, File
diff --git a/spec/ruby/core/file/zero_spec.rb b/spec/ruby/core/file/zero_spec.rb
index 0fc087faff..63dd85ee46 100644
--- a/spec/ruby/core/file/zero_spec.rb
+++ b/spec/ruby/core/file/zero_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/file/zero', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/file/zero'
describe "File.zero?" do
it_behaves_like :file_zero, :zero?, File