summaryrefslogtreecommitdiff
path: root/spec/ruby/core/float
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/float')
-rw-r--r--spec/ruby/core/float/abs_spec.rb2
-rw-r--r--spec/ruby/core/float/angle_spec.rb2
-rw-r--r--spec/ruby/core/float/arg_spec.rb2
-rw-r--r--spec/ruby/core/float/case_compare_spec.rb4
-rw-r--r--spec/ruby/core/float/ceil_spec.rb2
-rw-r--r--spec/ruby/core/float/coerce_spec.rb2
-rw-r--r--spec/ruby/core/float/comparison_spec.rb2
-rw-r--r--spec/ruby/core/float/constants_spec.rb2
-rw-r--r--spec/ruby/core/float/denominator_spec.rb2
-rw-r--r--spec/ruby/core/float/divide_spec.rb6
-rw-r--r--spec/ruby/core/float/divmod_spec.rb2
-rw-r--r--spec/ruby/core/float/dup_spec.rb2
-rw-r--r--spec/ruby/core/float/eql_spec.rb2
-rw-r--r--spec/ruby/core/float/equal_value_spec.rb4
-rw-r--r--spec/ruby/core/float/exponent_spec.rb2
-rw-r--r--spec/ruby/core/float/fdiv_spec.rb4
-rw-r--r--spec/ruby/core/float/finite_spec.rb2
-rw-r--r--spec/ruby/core/float/float_spec.rb2
-rw-r--r--spec/ruby/core/float/floor_spec.rb2
-rw-r--r--spec/ruby/core/float/gt_spec.rb4
-rw-r--r--spec/ruby/core/float/gte_spec.rb4
-rw-r--r--spec/ruby/core/float/hash_spec.rb2
-rw-r--r--spec/ruby/core/float/infinite_spec.rb2
-rw-r--r--spec/ruby/core/float/lt_spec.rb4
-rw-r--r--spec/ruby/core/float/lte_spec.rb4
-rw-r--r--spec/ruby/core/float/magnitude_spec.rb2
-rw-r--r--spec/ruby/core/float/minus_spec.rb4
-rw-r--r--spec/ruby/core/float/modulo_spec.rb4
-rw-r--r--spec/ruby/core/float/multiply_spec.rb4
-rw-r--r--spec/ruby/core/float/nan_spec.rb2
-rw-r--r--spec/ruby/core/float/next_float_spec.rb2
-rw-r--r--spec/ruby/core/float/numerator_spec.rb2
-rw-r--r--spec/ruby/core/float/phase_spec.rb2
-rw-r--r--spec/ruby/core/float/plus_spec.rb4
-rw-r--r--spec/ruby/core/float/prev_float_spec.rb2
-rw-r--r--spec/ruby/core/float/quo_spec.rb4
-rw-r--r--spec/ruby/core/float/rationalize_spec.rb2
-rw-r--r--spec/ruby/core/float/round_spec.rb2
-rw-r--r--spec/ruby/core/float/shared/abs.rb2
-rw-r--r--spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb2
-rw-r--r--spec/ruby/core/float/shared/comparison_exception_in_coerce.rb2
-rw-r--r--spec/ruby/core/float/to_f_spec.rb2
-rw-r--r--spec/ruby/core/float/to_i_spec.rb4
-rw-r--r--spec/ruby/core/float/to_int_spec.rb4
-rw-r--r--spec/ruby/core/float/to_r_spec.rb2
-rw-r--r--spec/ruby/core/float/to_s_spec.rb2
-rw-r--r--spec/ruby/core/float/truncate_spec.rb4
-rw-r--r--spec/ruby/core/float/uminus_spec.rb2
-rw-r--r--spec/ruby/core/float/uplus_spec.rb2
-rw-r--r--spec/ruby/core/float/zero_spec.rb2
50 files changed, 67 insertions, 67 deletions
diff --git a/spec/ruby/core/float/abs_spec.rb b/spec/ruby/core/float/abs_spec.rb
index 58e87c7602..8f016d0cd9 100644
--- a/spec/ruby/core/float/abs_spec.rb
+++ b/spec/ruby/core/float/abs_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../shared/abs', __FILE__)
+require_relative 'shared/abs'
describe "Float#abs" do
it_behaves_like :float_abs, :abs
diff --git a/spec/ruby/core/float/angle_spec.rb b/spec/ruby/core/float/angle_spec.rb
index 2a5d40ad30..9247b17cb4 100644
--- a/spec/ruby/core/float/angle_spec.rb
+++ b/spec/ruby/core/float/angle_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../shared/complex/float/arg', __FILE__)
+require_relative '../../shared/complex/float/arg'
describe "Float#angle" do
it_behaves_like :float_arg, :angle
diff --git a/spec/ruby/core/float/arg_spec.rb b/spec/ruby/core/float/arg_spec.rb
index 20a8ac0a63..971fe06b45 100644
--- a/spec/ruby/core/float/arg_spec.rb
+++ b/spec/ruby/core/float/arg_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../shared/complex/float/arg', __FILE__)
+require_relative '../../shared/complex/float/arg'
describe "Float#arg" do
it_behaves_like :float_arg, :arg
diff --git a/spec/ruby/core/float/case_compare_spec.rb b/spec/ruby/core/float/case_compare_spec.rb
index c2ad2941e0..b902fbea18 100644
--- a/spec/ruby/core/float/case_compare_spec.rb
+++ b/spec/ruby/core/float/case_compare_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/equal', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/equal'
describe "Float#===" do
it_behaves_like :float_equal, :===
diff --git a/spec/ruby/core/float/ceil_spec.rb b/spec/ruby/core/float/ceil_spec.rb
index f1d9dcd823..8a4f72c70e 100644
--- a/spec/ruby/core/float/ceil_spec.rb
+++ b/spec/ruby/core/float/ceil_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#ceil" do
it "returns the smallest Integer greater than or equal to self" do
diff --git a/spec/ruby/core/float/coerce_spec.rb b/spec/ruby/core/float/coerce_spec.rb
index 90475f2680..ea108f3303 100644
--- a/spec/ruby/core/float/coerce_spec.rb
+++ b/spec/ruby/core/float/coerce_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#coerce" do
it "returns [other, self] both as Floats" do
diff --git a/spec/ruby/core/float/comparison_spec.rb b/spec/ruby/core/float/comparison_spec.rb
index 49c3debbe1..a1ee423c24 100644
--- a/spec/ruby/core/float/comparison_spec.rb
+++ b/spec/ruby/core/float/comparison_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#<=>" do
it "returns -1, 0, 1 when self is less than, equal, or greater than other" do
diff --git a/spec/ruby/core/float/constants_spec.rb b/spec/ruby/core/float/constants_spec.rb
index 31930b125a..497e0ae188 100644
--- a/spec/ruby/core/float/constants_spec.rb
+++ b/spec/ruby/core/float/constants_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float constant" do
it "DIG is 15" do
diff --git a/spec/ruby/core/float/denominator_spec.rb b/spec/ruby/core/float/denominator_spec.rb
index 56f5d288cf..6f4fcfcf23 100644
--- a/spec/ruby/core/float/denominator_spec.rb
+++ b/spec/ruby/core/float/denominator_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#denominator" do
before :each do
diff --git a/spec/ruby/core/float/divide_spec.rb b/spec/ruby/core/float/divide_spec.rb
index 34d6ef45e1..f41b9f1f93 100644
--- a/spec/ruby/core/float/divide_spec.rb
+++ b/spec/ruby/core/float/divide_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/coerce.rb', __FILE__)
-require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'fixtures/coerce'
+require_relative 'shared/arithmetic_exception_in_coerce'
describe "Float#/" do
it_behaves_like :float_arithmetic_exception_in_coerce, :/
diff --git a/spec/ruby/core/float/divmod_spec.rb b/spec/ruby/core/float/divmod_spec.rb
index 174f142c86..5983efe1d9 100644
--- a/spec/ruby/core/float/divmod_spec.rb
+++ b/spec/ruby/core/float/divmod_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#divmod" do
it "returns an [quotient, modulus] from dividing self by other" do
diff --git a/spec/ruby/core/float/dup_spec.rb b/spec/ruby/core/float/dup_spec.rb
index 775dc2913c..8df7260652 100644
--- a/spec/ruby/core/float/dup_spec.rb
+++ b/spec/ruby/core/float/dup_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
ruby_version_is '2.4' do
describe "Float#dup" do
diff --git a/spec/ruby/core/float/eql_spec.rb b/spec/ruby/core/float/eql_spec.rb
index 7c4eef8523..6b5f91db33 100644
--- a/spec/ruby/core/float/eql_spec.rb
+++ b/spec/ruby/core/float/eql_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#eql?" do
it "returns true if other is a Float equal to self" do
diff --git a/spec/ruby/core/float/equal_value_spec.rb b/spec/ruby/core/float/equal_value_spec.rb
index 19ef01fc1c..03eea5108e 100644
--- a/spec/ruby/core/float/equal_value_spec.rb
+++ b/spec/ruby/core/float/equal_value_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/equal', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/equal'
describe "Float#==" do
it_behaves_like :float_equal, :==
diff --git a/spec/ruby/core/float/exponent_spec.rb b/spec/ruby/core/float/exponent_spec.rb
index 5cbba43a27..a4c03469a7 100644
--- a/spec/ruby/core/float/exponent_spec.rb
+++ b/spec/ruby/core/float/exponent_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#**" do
it "returns self raise to the other power" do
diff --git a/spec/ruby/core/float/fdiv_spec.rb b/spec/ruby/core/float/fdiv_spec.rb
index 632dd0f293..be25ee283b 100644
--- a/spec/ruby/core/float/fdiv_spec.rb
+++ b/spec/ruby/core/float/fdiv_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/quo', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/quo'
describe "Float#fdiv" do
it_behaves_like :float_quo, :fdiv
diff --git a/spec/ruby/core/float/finite_spec.rb b/spec/ruby/core/float/finite_spec.rb
index d6a161d4e3..c5fb3df849 100644
--- a/spec/ruby/core/float/finite_spec.rb
+++ b/spec/ruby/core/float/finite_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#finite?" do
it "returns true for finite values" do
diff --git a/spec/ruby/core/float/float_spec.rb b/spec/ruby/core/float/float_spec.rb
index f2931d184c..3ad4ce817a 100644
--- a/spec/ruby/core/float/float_spec.rb
+++ b/spec/ruby/core/float/float_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float" do
it "includes Comparable" do
diff --git a/spec/ruby/core/float/floor_spec.rb b/spec/ruby/core/float/floor_spec.rb
index 6da5d5c5ee..f20eccae73 100644
--- a/spec/ruby/core/float/floor_spec.rb
+++ b/spec/ruby/core/float/floor_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#floor" do
it "returns the largest Integer less than or equal to self" do
diff --git a/spec/ruby/core/float/gt_spec.rb b/spec/ruby/core/float/gt_spec.rb
index 96ea805f90..6ecab3592d 100644
--- a/spec/ruby/core/float/gt_spec.rb
+++ b/spec/ruby/core/float/gt_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/comparison_exception_in_coerce'
describe "Float#>" do
it_behaves_like :float_comparison_exception_in_coerce, :>
diff --git a/spec/ruby/core/float/gte_spec.rb b/spec/ruby/core/float/gte_spec.rb
index 1903308763..0886dffd97 100644
--- a/spec/ruby/core/float/gte_spec.rb
+++ b/spec/ruby/core/float/gte_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/comparison_exception_in_coerce'
describe "Float#>=" do
it_behaves_like :float_comparison_exception_in_coerce, :>=
diff --git a/spec/ruby/core/float/hash_spec.rb b/spec/ruby/core/float/hash_spec.rb
index c638e99347..5f77e3b4a1 100644
--- a/spec/ruby/core/float/hash_spec.rb
+++ b/spec/ruby/core/float/hash_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#hash" do
it "is provided" do
diff --git a/spec/ruby/core/float/infinite_spec.rb b/spec/ruby/core/float/infinite_spec.rb
index 4e31effab7..901c2738aa 100644
--- a/spec/ruby/core/float/infinite_spec.rb
+++ b/spec/ruby/core/float/infinite_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#infinite?" do
it "returns nil for finite values" do
diff --git a/spec/ruby/core/float/lt_spec.rb b/spec/ruby/core/float/lt_spec.rb
index d83fee0d4a..9723b59c5e 100644
--- a/spec/ruby/core/float/lt_spec.rb
+++ b/spec/ruby/core/float/lt_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/comparison_exception_in_coerce'
describe "Float#<" do
it_behaves_like :float_comparison_exception_in_coerce, :<
diff --git a/spec/ruby/core/float/lte_spec.rb b/spec/ruby/core/float/lte_spec.rb
index 3d5f830633..0a0a06d753 100644
--- a/spec/ruby/core/float/lte_spec.rb
+++ b/spec/ruby/core/float/lte_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/comparison_exception_in_coerce'
describe "Float#<=" do
it_behaves_like :float_comparison_exception_in_coerce, :>=
diff --git a/spec/ruby/core/float/magnitude_spec.rb b/spec/ruby/core/float/magnitude_spec.rb
index 95b4efc158..db577c15c5 100644
--- a/spec/ruby/core/float/magnitude_spec.rb
+++ b/spec/ruby/core/float/magnitude_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../shared/abs', __FILE__)
+require_relative 'shared/abs'
describe "Float#magnitude" do
it_behaves_like :float_abs, :magnitude
diff --git a/spec/ruby/core/float/minus_spec.rb b/spec/ruby/core/float/minus_spec.rb
index 49a81e2fc8..5626cbdac2 100644
--- a/spec/ruby/core/float/minus_spec.rb
+++ b/spec/ruby/core/float/minus_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/arithmetic_exception_in_coerce'
describe "Float#-" do
it_behaves_like :float_arithmetic_exception_in_coerce, :-
diff --git a/spec/ruby/core/float/modulo_spec.rb b/spec/ruby/core/float/modulo_spec.rb
index fffa6cab67..8ae80a0b05 100644
--- a/spec/ruby/core/float/modulo_spec.rb
+++ b/spec/ruby/core/float/modulo_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/modulo', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/modulo'
describe "Float#%" do
it_behaves_like :float_modulo, :%
diff --git a/spec/ruby/core/float/multiply_spec.rb b/spec/ruby/core/float/multiply_spec.rb
index f13beb7641..69a5dcc95a 100644
--- a/spec/ruby/core/float/multiply_spec.rb
+++ b/spec/ruby/core/float/multiply_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/arithmetic_exception_in_coerce'
describe "Float#*" do
it_behaves_like :float_arithmetic_exception_in_coerce, :*
diff --git a/spec/ruby/core/float/nan_spec.rb b/spec/ruby/core/float/nan_spec.rb
index 95a61d8872..d09d25153c 100644
--- a/spec/ruby/core/float/nan_spec.rb
+++ b/spec/ruby/core/float/nan_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#nan?" do
it "returns true if self is not a valid IEEE floating-point number" do
diff --git a/spec/ruby/core/float/next_float_spec.rb b/spec/ruby/core/float/next_float_spec.rb
index d5a7748a06..2f0eff605a 100644
--- a/spec/ruby/core/float/next_float_spec.rb
+++ b/spec/ruby/core/float/next_float_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#next_float" do
it "returns a float the smallest possible step greater than the receiver" do
diff --git a/spec/ruby/core/float/numerator_spec.rb b/spec/ruby/core/float/numerator_spec.rb
index 9644d01c23..7832e8f056 100644
--- a/spec/ruby/core/float/numerator_spec.rb
+++ b/spec/ruby/core/float/numerator_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#numerator" do
before :all do
diff --git a/spec/ruby/core/float/phase_spec.rb b/spec/ruby/core/float/phase_spec.rb
index 95d0053816..cebc7954ac 100644
--- a/spec/ruby/core/float/phase_spec.rb
+++ b/spec/ruby/core/float/phase_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../shared/complex/float/arg', __FILE__)
+require_relative '../../shared/complex/float/arg'
describe "Float#phase" do
it_behaves_like :float_arg, :phase
diff --git a/spec/ruby/core/float/plus_spec.rb b/spec/ruby/core/float/plus_spec.rb
index 743ac5f618..06b136a06b 100644
--- a/spec/ruby/core/float/plus_spec.rb
+++ b/spec/ruby/core/float/plus_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/arithmetic_exception_in_coerce'
describe "Float#+" do
it_behaves_like :float_arithmetic_exception_in_coerce, :+
diff --git a/spec/ruby/core/float/prev_float_spec.rb b/spec/ruby/core/float/prev_float_spec.rb
index e07d78c44c..40fcc25a6d 100644
--- a/spec/ruby/core/float/prev_float_spec.rb
+++ b/spec/ruby/core/float/prev_float_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#prev_float" do
it "returns a float the smallest possible step smaller than the receiver" do
diff --git a/spec/ruby/core/float/quo_spec.rb b/spec/ruby/core/float/quo_spec.rb
index dcda8f5f3b..b5c64f9d87 100644
--- a/spec/ruby/core/float/quo_spec.rb
+++ b/spec/ruby/core/float/quo_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/quo', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/quo'
describe "Float#quo" do
it_behaves_like :float_quo, :quo
diff --git a/spec/ruby/core/float/rationalize_spec.rb b/spec/ruby/core/float/rationalize_spec.rb
index 541080c48b..978425e084 100644
--- a/spec/ruby/core/float/rationalize_spec.rb
+++ b/spec/ruby/core/float/rationalize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#rationalize" do
it "returns self as a simplified Rational with no argument" do
diff --git a/spec/ruby/core/float/round_spec.rb b/spec/ruby/core/float/round_spec.rb
index 56668d5856..e04b376c36 100644
--- a/spec/ruby/core/float/round_spec.rb
+++ b/spec/ruby/core/float/round_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#round" do
it "returns the nearest Integer" do
diff --git a/spec/ruby/core/float/shared/abs.rb b/spec/ruby/core/float/shared/abs.rb
index c59198bfe2..607983322d 100644
--- a/spec/ruby/core/float/shared/abs.rb
+++ b/spec/ruby/core/float/shared/abs.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
describe :float_abs, shared: true do
it "returns the absolute value" do
diff --git a/spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb b/spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb
index 0d9f32af16..71b540f752 100644
--- a/spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb
+++ b/spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../fixtures/classes', __FILE__)
+require_relative '../fixtures/classes'
describe :float_arithmetic_exception_in_coerce, shared: true do
ruby_version_is ""..."2.5" do
diff --git a/spec/ruby/core/float/shared/comparison_exception_in_coerce.rb b/spec/ruby/core/float/shared/comparison_exception_in_coerce.rb
index 688e5dc0d1..6d6f14da30 100644
--- a/spec/ruby/core/float/shared/comparison_exception_in_coerce.rb
+++ b/spec/ruby/core/float/shared/comparison_exception_in_coerce.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../fixtures/classes', __FILE__)
+require_relative '../fixtures/classes'
describe :float_comparison_exception_in_coerce, shared: true do
ruby_version_is ""..."2.5" do
diff --git a/spec/ruby/core/float/to_f_spec.rb b/spec/ruby/core/float/to_f_spec.rb
index 02666ae7d7..6677556cd9 100644
--- a/spec/ruby/core/float/to_f_spec.rb
+++ b/spec/ruby/core/float/to_f_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#to_f" do
it "returns self" do
diff --git a/spec/ruby/core/float/to_i_spec.rb b/spec/ruby/core/float/to_i_spec.rb
index 899e179678..91d84c5fa3 100644
--- a/spec/ruby/core/float/to_i_spec.rb
+++ b/spec/ruby/core/float/to_i_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/to_i', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/to_i'
describe "Float#to_i" do
it_behaves_like :float_to_i, :to_i
diff --git a/spec/ruby/core/float/to_int_spec.rb b/spec/ruby/core/float/to_int_spec.rb
index c37ccdaa91..084a58b431 100644
--- a/spec/ruby/core/float/to_int_spec.rb
+++ b/spec/ruby/core/float/to_int_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/to_i', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/to_i'
describe "Float#to_int" do
it_behaves_like :float_to_i, :to_int
diff --git a/spec/ruby/core/float/to_r_spec.rb b/spec/ruby/core/float/to_r_spec.rb
index a0f5cd9700..907ff08f27 100644
--- a/spec/ruby/core/float/to_r_spec.rb
+++ b/spec/ruby/core/float/to_r_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#to_r" do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/core/float/to_s_spec.rb b/spec/ruby/core/float/to_s_spec.rb
index e76cfc1b7e..58a58549ed 100644
--- a/spec/ruby/core/float/to_s_spec.rb
+++ b/spec/ruby/core/float/to_s_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#to_s" do
it "returns 'NaN' for NaN" do
diff --git a/spec/ruby/core/float/truncate_spec.rb b/spec/ruby/core/float/truncate_spec.rb
index 097aa751a4..5c219da960 100644
--- a/spec/ruby/core/float/truncate_spec.rb
+++ b/spec/ruby/core/float/truncate_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../shared/to_i', __FILE__)
+require_relative '../../spec_helper'
+require_relative 'shared/to_i'
describe "Float#truncate" do
it_behaves_like :float_to_i, :truncate
diff --git a/spec/ruby/core/float/uminus_spec.rb b/spec/ruby/core/float/uminus_spec.rb
index 70e2ff0580..e676a26ada 100644
--- a/spec/ruby/core/float/uminus_spec.rb
+++ b/spec/ruby/core/float/uminus_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#-@" do
it "negates self" do
diff --git a/spec/ruby/core/float/uplus_spec.rb b/spec/ruby/core/float/uplus_spec.rb
index 75f18191dd..936123558c 100644
--- a/spec/ruby/core/float/uplus_spec.rb
+++ b/spec/ruby/core/float/uplus_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#+@" do
it "returns the same value with same sign (twos complement)" do
diff --git a/spec/ruby/core/float/zero_spec.rb b/spec/ruby/core/float/zero_spec.rb
index 3a67551a07..e70edc422a 100644
--- a/spec/ruby/core/float/zero_spec.rb
+++ b/spec/ruby/core/float/zero_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Float#zero?" do
it "returns true if self is 0.0" do