summaryrefslogtreecommitdiff
path: root/spec/ruby/shared/rational
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 15:09:32 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 15:09:32 +0000
commit401b64c4e840bc8887219e9e445a64b3d5943656 (patch)
tree989b93914e9a8ee57ef3ce0bb3d2e2083470fc49 /spec/ruby/shared/rational
parent8a15857a7f283101a3923b76c71a1f05bfe58512 (diff)
Update to ruby/spec@c1b568b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/shared/rational')
-rw-r--r--spec/ruby/shared/rational/Rational.rb4
-rw-r--r--spec/ruby/shared/rational/abs.rb2
-rw-r--r--spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb2
-rw-r--r--spec/ruby/shared/rational/ceil.rb2
-rw-r--r--spec/ruby/shared/rational/coerce.rb2
-rw-r--r--spec/ruby/shared/rational/comparison.rb4
-rw-r--r--spec/ruby/shared/rational/denominator.rb2
-rw-r--r--spec/ruby/shared/rational/div.rb2
-rw-r--r--spec/ruby/shared/rational/divide.rb2
-rw-r--r--spec/ruby/shared/rational/divmod.rb2
-rw-r--r--spec/ruby/shared/rational/equal_value.rb2
-rw-r--r--spec/ruby/shared/rational/exponent.rb2
-rw-r--r--spec/ruby/shared/rational/fdiv.rb2
-rw-r--r--spec/ruby/shared/rational/floor.rb2
-rw-r--r--spec/ruby/shared/rational/hash.rb2
-rw-r--r--spec/ruby/shared/rational/inspect.rb2
-rw-r--r--spec/ruby/shared/rational/marshal_dump.rb2
-rw-r--r--spec/ruby/shared/rational/marshal_load.rb2
-rw-r--r--spec/ruby/shared/rational/minus.rb2
-rw-r--r--spec/ruby/shared/rational/modulo.rb2
-rw-r--r--spec/ruby/shared/rational/multiply.rb2
-rw-r--r--spec/ruby/shared/rational/numerator.rb2
-rw-r--r--spec/ruby/shared/rational/plus.rb2
-rw-r--r--spec/ruby/shared/rational/quo.rb2
-rw-r--r--spec/ruby/shared/rational/remainder.rb2
-rw-r--r--spec/ruby/shared/rational/round.rb2
-rw-r--r--spec/ruby/shared/rational/to_f.rb2
-rw-r--r--spec/ruby/shared/rational/to_i.rb2
-rw-r--r--spec/ruby/shared/rational/to_r.rb2
-rw-r--r--spec/ruby/shared/rational/to_s.rb2
-rw-r--r--spec/ruby/shared/rational/truncate.rb2
31 files changed, 33 insertions, 33 deletions
diff --git a/spec/ruby/shared/rational/Rational.rb b/spec/ruby/shared/rational/Rational.rb
index 0165fa769a..68f0150186 100644
--- a/spec/ruby/shared/rational/Rational.rb
+++ b/spec/ruby/shared/rational/Rational.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../fixtures/rational', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../fixtures/rational'
describe :kernel_Rational, shared: true do
describe "passed Integer" do
diff --git a/spec/ruby/shared/rational/abs.rb b/spec/ruby/shared/rational/abs.rb
index aa1bdc4363..8beb20da7e 100644
--- a/spec/ruby/shared/rational/abs.rb
+++ b/spec/ruby/shared/rational/abs.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_abs, shared: true do
it "returns self's absolute value" do
diff --git a/spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb b/spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb
index 0b09ec5265..9377814732 100644
--- a/spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb
+++ b/spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../fixtures/rational', __FILE__)
+require_relative '../../fixtures/rational'
describe :rational_arithmetic_exception_in_coerce, shared: true do
ruby_version_is ""..."2.5" do
diff --git a/spec/ruby/shared/rational/ceil.rb b/spec/ruby/shared/rational/ceil.rb
index cbb4ed0d08..f1cf60d2be 100644
--- a/spec/ruby/shared/rational/ceil.rb
+++ b/spec/ruby/shared/rational/ceil.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_ceil, shared: true do
before do
diff --git a/spec/ruby/shared/rational/coerce.rb b/spec/ruby/shared/rational/coerce.rb
index 8bdd19aa2a..0d6c440993 100644
--- a/spec/ruby/shared/rational/coerce.rb
+++ b/spec/ruby/shared/rational/coerce.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_coerce, shared: true do
it "returns the passed argument, self as Float, when given a Float" do
diff --git a/spec/ruby/shared/rational/comparison.rb b/spec/ruby/shared/rational/comparison.rb
index ba2d0e9f20..0c8b3d0ac1 100644
--- a/spec/ruby/shared/rational/comparison.rb
+++ b/spec/ruby/shared/rational/comparison.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../fixtures/rational', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../fixtures/rational'
describe :rational_cmp_rat, shared: true do
it "returns 1 when self is greater than the passed argument" do
diff --git a/spec/ruby/shared/rational/denominator.rb b/spec/ruby/shared/rational/denominator.rb
index 74e464465d..10d46aacb3 100644
--- a/spec/ruby/shared/rational/denominator.rb
+++ b/spec/ruby/shared/rational/denominator.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_denominator, shared: true do
it "returns the denominator" do
diff --git a/spec/ruby/shared/rational/div.rb b/spec/ruby/shared/rational/div.rb
index 23c11f5d12..2bf9b80eb5 100644
--- a/spec/ruby/shared/rational/div.rb
+++ b/spec/ruby/shared/rational/div.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_div_rat, shared: true do
it "performs integer division and returns the result" do
diff --git a/spec/ruby/shared/rational/divide.rb b/spec/ruby/shared/rational/divide.rb
index 8c5bf666e6..86d30c39d8 100644
--- a/spec/ruby/shared/rational/divide.rb
+++ b/spec/ruby/shared/rational/divide.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_divide_rat, shared: true do
it "returns self divided by other as a Rational" do
diff --git a/spec/ruby/shared/rational/divmod.rb b/spec/ruby/shared/rational/divmod.rb
index 607ae9d693..9433674007 100644
--- a/spec/ruby/shared/rational/divmod.rb
+++ b/spec/ruby/shared/rational/divmod.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_divmod_rat, shared: true do
it "returns the quotient as Integer and the remainder as Rational" do
diff --git a/spec/ruby/shared/rational/equal_value.rb b/spec/ruby/shared/rational/equal_value.rb
index be4d5af598..b2e7e09415 100644
--- a/spec/ruby/shared/rational/equal_value.rb
+++ b/spec/ruby/shared/rational/equal_value.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_equal_value_rat, shared: true do
it "returns true if self has the same numerator and denominator as the passed argument" do
diff --git a/spec/ruby/shared/rational/exponent.rb b/spec/ruby/shared/rational/exponent.rb
index 7e7c5be7c1..d361f345d5 100644
--- a/spec/ruby/shared/rational/exponent.rb
+++ b/spec/ruby/shared/rational/exponent.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_exponent, shared: true do
describe "when passed Rational" do
diff --git a/spec/ruby/shared/rational/fdiv.rb b/spec/ruby/shared/rational/fdiv.rb
index 22ca4b4ddc..6911ade8ac 100644
--- a/spec/ruby/shared/rational/fdiv.rb
+++ b/spec/ruby/shared/rational/fdiv.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_fdiv, shared: true do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/shared/rational/floor.rb b/spec/ruby/shared/rational/floor.rb
index 5106e0b4d9..ddf7fdbd17 100644
--- a/spec/ruby/shared/rational/floor.rb
+++ b/spec/ruby/shared/rational/floor.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_floor, shared: true do
before do
diff --git a/spec/ruby/shared/rational/hash.rb b/spec/ruby/shared/rational/hash.rb
index a83ce49afb..50f21cec20 100644
--- a/spec/ruby/shared/rational/hash.rb
+++ b/spec/ruby/shared/rational/hash.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_hash, shared: true do
# BUG: Rational(2, 3).hash == Rational(3, 2).hash
diff --git a/spec/ruby/shared/rational/inspect.rb b/spec/ruby/shared/rational/inspect.rb
index a641db8eb8..a7fd42ccac 100644
--- a/spec/ruby/shared/rational/inspect.rb
+++ b/spec/ruby/shared/rational/inspect.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_inspect, shared: true do
conflicts_with :Prime do
diff --git a/spec/ruby/shared/rational/marshal_dump.rb b/spec/ruby/shared/rational/marshal_dump.rb
index 673c6c8327..09782b45a5 100644
--- a/spec/ruby/shared/rational/marshal_dump.rb
+++ b/spec/ruby/shared/rational/marshal_dump.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_marshal_dump, shared: true do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/shared/rational/marshal_load.rb b/spec/ruby/shared/rational/marshal_load.rb
index 7cf32ad1db..20bdd6fdf4 100644
--- a/spec/ruby/shared/rational/marshal_load.rb
+++ b/spec/ruby/shared/rational/marshal_load.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_marshal_load, shared: true do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/shared/rational/minus.rb b/spec/ruby/shared/rational/minus.rb
index e23430111e..0a0946fdb9 100644
--- a/spec/ruby/shared/rational/minus.rb
+++ b/spec/ruby/shared/rational/minus.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_minus_rat, shared: true do
it "returns the result of subtracting other from self as a Rational" do
diff --git a/spec/ruby/shared/rational/modulo.rb b/spec/ruby/shared/rational/modulo.rb
index ca69650f20..39abaed5fe 100644
--- a/spec/ruby/shared/rational/modulo.rb
+++ b/spec/ruby/shared/rational/modulo.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_modulo, shared: true do
it "returns the remainder when this value is divided by other" do
diff --git a/spec/ruby/shared/rational/multiply.rb b/spec/ruby/shared/rational/multiply.rb
index 05a9cfc5c8..9c861cf79d 100644
--- a/spec/ruby/shared/rational/multiply.rb
+++ b/spec/ruby/shared/rational/multiply.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_multiply_rat, shared: true do
it "returns self divided by other as a Rational" do
diff --git a/spec/ruby/shared/rational/numerator.rb b/spec/ruby/shared/rational/numerator.rb
index e4868ef43c..50d768168c 100644
--- a/spec/ruby/shared/rational/numerator.rb
+++ b/spec/ruby/shared/rational/numerator.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_numerator, shared: true do
it "returns the numerator" do
diff --git a/spec/ruby/shared/rational/plus.rb b/spec/ruby/shared/rational/plus.rb
index e37c757c13..b126360ee4 100644
--- a/spec/ruby/shared/rational/plus.rb
+++ b/spec/ruby/shared/rational/plus.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_plus_rat, shared: true do
it "returns the result of subtracting other from self as a Rational" do
diff --git a/spec/ruby/shared/rational/quo.rb b/spec/ruby/shared/rational/quo.rb
index 61bd3fad9d..53b32fed2f 100644
--- a/spec/ruby/shared/rational/quo.rb
+++ b/spec/ruby/shared/rational/quo.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_quo, shared: true do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/shared/rational/remainder.rb b/spec/ruby/shared/rational/remainder.rb
index 64aeb55e6c..dd907608db 100644
--- a/spec/ruby/shared/rational/remainder.rb
+++ b/spec/ruby/shared/rational/remainder.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_remainder, shared: true do
it "needs to be reviewed for spec completeness"
diff --git a/spec/ruby/shared/rational/round.rb b/spec/ruby/shared/rational/round.rb
index c7a4cc6d07..a3f92413e7 100644
--- a/spec/ruby/shared/rational/round.rb
+++ b/spec/ruby/shared/rational/round.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_round, shared: true do
before do
diff --git a/spec/ruby/shared/rational/to_f.rb b/spec/ruby/shared/rational/to_f.rb
index 2c9afdddda..56e0b61d68 100644
--- a/spec/ruby/shared/rational/to_f.rb
+++ b/spec/ruby/shared/rational/to_f.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_to_f, shared: true do
it "returns self converted to a Float" do
diff --git a/spec/ruby/shared/rational/to_i.rb b/spec/ruby/shared/rational/to_i.rb
index b0db78b3a8..9be1183aa4 100644
--- a/spec/ruby/shared/rational/to_i.rb
+++ b/spec/ruby/shared/rational/to_i.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_to_i, shared: true do
it "converts self to an Integer by truncation" do
diff --git a/spec/ruby/shared/rational/to_r.rb b/spec/ruby/shared/rational/to_r.rb
index 646167614a..9ae7571ffe 100644
--- a/spec/ruby/shared/rational/to_r.rb
+++ b/spec/ruby/shared/rational/to_r.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_to_r, shared: true do
conflicts_with :Prime do
diff --git a/spec/ruby/shared/rational/to_s.rb b/spec/ruby/shared/rational/to_s.rb
index 429a021908..b16594f10c 100644
--- a/spec/ruby/shared/rational/to_s.rb
+++ b/spec/ruby/shared/rational/to_s.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_to_s, shared: true do
it "returns a string representation of self" do
diff --git a/spec/ruby/shared/rational/truncate.rb b/spec/ruby/shared/rational/truncate.rb
index 993c654c45..761dd3113a 100644
--- a/spec/ruby/shared/rational/truncate.rb
+++ b/spec/ruby/shared/rational/truncate.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe :rational_truncate, shared: true do
before do