summaryrefslogtreecommitdiff
path: root/spec/ruby/core/matchdata
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/matchdata')
-rw-r--r--spec/ruby/core/matchdata/begin_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/captures_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/element_reference_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/end_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/eql_spec.rb4
-rw-r--r--spec/ruby/core/matchdata/equal_value_spec.rb4
-rw-r--r--spec/ruby/core/matchdata/hash_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/inspect_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/length_spec.rb4
-rw-r--r--spec/ruby/core/matchdata/named_captures_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/names_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/offset_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/post_match_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/pre_match_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/regexp_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/shared/eql.rb2
-rw-r--r--spec/ruby/core/matchdata/size_spec.rb4
-rw-r--r--spec/ruby/core/matchdata/string_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/to_a_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/to_s_spec.rb2
-rw-r--r--spec/ruby/core/matchdata/values_at_spec.rb2
21 files changed, 25 insertions, 25 deletions
diff --git a/spec/ruby/core/matchdata/begin_spec.rb b/spec/ruby/core/matchdata/begin_spec.rb
index b3d042066d..b791018633 100644
--- a/spec/ruby/core/matchdata/begin_spec.rb
+++ b/spec/ruby/core/matchdata/begin_spec.rb
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#begin" do
it "returns the offset of the start of the nth element" do
diff --git a/spec/ruby/core/matchdata/captures_spec.rb b/spec/ruby/core/matchdata/captures_spec.rb
index 2a83b26cd4..8c0d2978b7 100644
--- a/spec/ruby/core/matchdata/captures_spec.rb
+++ b/spec/ruby/core/matchdata/captures_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#captures" do
it "returns an array of the match captures" do
diff --git a/spec/ruby/core/matchdata/element_reference_spec.rb b/spec/ruby/core/matchdata/element_reference_spec.rb
index 17d16a5526..1f02ef235b 100644
--- a/spec/ruby/core/matchdata/element_reference_spec.rb
+++ b/spec/ruby/core/matchdata/element_reference_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#[]" do
it "acts as normal array indexing [index]" do
diff --git a/spec/ruby/core/matchdata/end_spec.rb b/spec/ruby/core/matchdata/end_spec.rb
index 4e74492105..f6f3e1a281 100644
--- a/spec/ruby/core/matchdata/end_spec.rb
+++ b/spec/ruby/core/matchdata/end_spec.rb
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#end" do
it "returns the offset of the end of the nth element" do
diff --git a/spec/ruby/core/matchdata/eql_spec.rb b/spec/ruby/core/matchdata/eql_spec.rb
index d141fee97f..1d9666ebe1 100644
--- a/spec/ruby/core/matchdata/eql_spec.rb
+++ b/spec/ruby/core/matchdata/eql_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/eql', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/eql'
describe "MatchData#eql?" do
it_behaves_like :matchdata_eql, :eql?
diff --git a/spec/ruby/core/matchdata/equal_value_spec.rb b/spec/ruby/core/matchdata/equal_value_spec.rb
index 1fd471d3de..a58f1277e4 100644
--- a/spec/ruby/core/matchdata/equal_value_spec.rb
+++ b/spec/ruby/core/matchdata/equal_value_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/eql', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/eql'
describe "MatchData#==" do
it_behaves_like :matchdata_eql, :==
diff --git a/spec/ruby/core/matchdata/hash_spec.rb b/spec/ruby/core/matchdata/hash_spec.rb
index 1d5c8a203f..cef18fdd20 100644
--- a/spec/ruby/core/matchdata/hash_spec.rb
+++ b/spec/ruby/core/matchdata/hash_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#hash" do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/core/matchdata/inspect_spec.rb b/spec/ruby/core/matchdata/inspect_spec.rb
index eb71d45523..5315257677 100644
--- a/spec/ruby/core/matchdata/inspect_spec.rb
+++ b/spec/ruby/core/matchdata/inspect_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#inspect" do
before :each do
diff --git a/spec/ruby/core/matchdata/length_spec.rb b/spec/ruby/core/matchdata/length_spec.rb
index adbe81902a..39df36df4b 100644
--- a/spec/ruby/core/matchdata/length_spec.rb
+++ b/spec/ruby/core/matchdata/length_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/length', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/length'
describe "MatchData#length" do
it_behaves_like :matchdata_length, :length
diff --git a/spec/ruby/core/matchdata/named_captures_spec.rb b/spec/ruby/core/matchdata/named_captures_spec.rb
index cc3aaa2b45..588b607a44 100644
--- a/spec/ruby/core/matchdata/named_captures_spec.rb
+++ b/spec/ruby/core/matchdata/named_captures_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
ruby_version_is '2.4' do
describe 'MatchData#named_captures' do
diff --git a/spec/ruby/core/matchdata/names_spec.rb b/spec/ruby/core/matchdata/names_spec.rb
index e298c85593..25ca06ced9 100644
--- a/spec/ruby/core/matchdata/names_spec.rb
+++ b/spec/ruby/core/matchdata/names_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#names" do
it "returns an Array" do
diff --git a/spec/ruby/core/matchdata/offset_spec.rb b/spec/ruby/core/matchdata/offset_spec.rb
index 6ddb56c1a7..1ccb54b7a7 100644
--- a/spec/ruby/core/matchdata/offset_spec.rb
+++ b/spec/ruby/core/matchdata/offset_spec.rb
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#offset" do
it "returns a two element array with the begin and end of the nth match" do
diff --git a/spec/ruby/core/matchdata/post_match_spec.rb b/spec/ruby/core/matchdata/post_match_spec.rb
index 670e0887ab..43e25561af 100644
--- a/spec/ruby/core/matchdata/post_match_spec.rb
+++ b/spec/ruby/core/matchdata/post_match_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#post_match" do
it "returns the string after the match equiv. special var $'" do
diff --git a/spec/ruby/core/matchdata/pre_match_spec.rb b/spec/ruby/core/matchdata/pre_match_spec.rb
index 1f1f9daec6..f71920354c 100644
--- a/spec/ruby/core/matchdata/pre_match_spec.rb
+++ b/spec/ruby/core/matchdata/pre_match_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#pre_match" do
it "returns the string before the match, equiv. special var $`" do
diff --git a/spec/ruby/core/matchdata/regexp_spec.rb b/spec/ruby/core/matchdata/regexp_spec.rb
index 2fdca34c30..05a8e80567 100644
--- a/spec/ruby/core/matchdata/regexp_spec.rb
+++ b/spec/ruby/core/matchdata/regexp_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#regexp" do
it "returns a Regexp object" do
diff --git a/spec/ruby/core/matchdata/shared/eql.rb b/spec/ruby/core/matchdata/shared/eql.rb
index 098d82db5b..e021baa178 100644
--- a/spec/ruby/core/matchdata/shared/eql.rb
+++ b/spec/ruby/core/matchdata/shared/eql.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe :matchdata_eql, shared: true do
it "returns true if both operands have equal target strings, patterns, and match positions" do
diff --git a/spec/ruby/core/matchdata/size_spec.rb b/spec/ruby/core/matchdata/size_spec.rb
index 8c990a8a77..b4965db3b8 100644
--- a/spec/ruby/core/matchdata/size_spec.rb
+++ b/spec/ruby/core/matchdata/size_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/length', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/length'
describe "MatchData#size" do
it_behaves_like :matchdata_length, :size
diff --git a/spec/ruby/core/matchdata/string_spec.rb b/spec/ruby/core/matchdata/string_spec.rb
index 793684d36a..ff1b4eab5b 100644
--- a/spec/ruby/core/matchdata/string_spec.rb
+++ b/spec/ruby/core/matchdata/string_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#string" do
it "returns a copy of the match string" do
diff --git a/spec/ruby/core/matchdata/to_a_spec.rb b/spec/ruby/core/matchdata/to_a_spec.rb
index 592a68db0e..6231d096fb 100644
--- a/spec/ruby/core/matchdata/to_a_spec.rb
+++ b/spec/ruby/core/matchdata/to_a_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#to_a" do
it "returns an array of matches" do
diff --git a/spec/ruby/core/matchdata/to_s_spec.rb b/spec/ruby/core/matchdata/to_s_spec.rb
index 3eb3b92533..9e213bb342 100644
--- a/spec/ruby/core/matchdata/to_s_spec.rb
+++ b/spec/ruby/core/matchdata/to_s_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#to_s" do
it "returns the entire matched string" do
diff --git a/spec/ruby/core/matchdata/values_at_spec.rb b/spec/ruby/core/matchdata/values_at_spec.rb
index 0b2727e001..af844904f6 100644
--- a/spec/ruby/core/matchdata/values_at_spec.rb
+++ b/spec/ruby/core/matchdata/values_at_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "MatchData#values_at" do
it "returns an array of the matching value" do