aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/math
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/math
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
downloadruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/math')
-rw-r--r--spec/ruby/core/math/acos_spec.rb10
-rw-r--r--spec/ruby/core/math/acosh_spec.rb10
-rw-r--r--spec/ruby/core/math/asin_spec.rb8
-rw-r--r--spec/ruby/core/math/asinh_spec.rb4
-rw-r--r--spec/ruby/core/math/atan2_spec.rb12
-rw-r--r--spec/ruby/core/math/atan_spec.rb4
-rw-r--r--spec/ruby/core/math/cbrt_spec.rb4
-rw-r--r--spec/ruby/core/math/cos_spec.rb4
-rw-r--r--spec/ruby/core/math/cosh_spec.rb4
-rw-r--r--spec/ruby/core/math/erf_spec.rb4
-rw-r--r--spec/ruby/core/math/erfc_spec.rb4
-rw-r--r--spec/ruby/core/math/exp_spec.rb4
-rw-r--r--spec/ruby/core/math/frexp_spec.rb4
-rw-r--r--spec/ruby/core/math/gamma_spec.rb4
-rw-r--r--spec/ruby/core/math/hypot_spec.rb4
-rw-r--r--spec/ruby/core/math/ldexp_spec.rb10
-rw-r--r--spec/ruby/core/math/lgamma_spec.rb2
-rw-r--r--spec/ruby/core/math/log10_spec.rb6
-rw-r--r--spec/ruby/core/math/log2_spec.rb8
-rw-r--r--spec/ruby/core/math/log_spec.rb12
-rw-r--r--spec/ruby/core/math/sin_spec.rb4
-rw-r--r--spec/ruby/core/math/sinh_spec.rb4
-rw-r--r--spec/ruby/core/math/sqrt_spec.rb4
-rw-r--r--spec/ruby/core/math/tan_spec.rb4
-rw-r--r--spec/ruby/core/math/tanh_spec.rb4
25 files changed, 71 insertions, 71 deletions
diff --git a/spec/ruby/core/math/acos_spec.rb b/spec/ruby/core/math/acos_spec.rb
index 0f104b8efc..8b321ab29b 100644
--- a/spec/ruby/core/math/acos_spec.rb
+++ b/spec/ruby/core/math/acos_spec.rb
@@ -21,15 +21,15 @@ describe "Math.acos" do
end
it "raises an Math::DomainError if the argument is greater than 1.0" do
- lambda { Math.acos(1.0001) }.should raise_error(Math::DomainError)
+ -> { Math.acos(1.0001) }.should raise_error(Math::DomainError)
end
it "raises an Math::DomainError if the argument is less than -1.0" do
- lambda { Math.acos(-1.0001) }.should raise_error(Math::DomainError)
+ -> { Math.acos(-1.0001) }.should raise_error(Math::DomainError)
end
it "raises a TypeError if the string argument cannot be coerced with Float()" do
- lambda { Math.acos("test") }.should raise_error(TypeError)
+ -> { Math.acos("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -37,11 +37,11 @@ describe "Math.acos" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.acos(MathSpecs::UserClass.new) }.should raise_error(TypeError)
+ -> { Math.acos(MathSpecs::UserClass.new) }.should raise_error(TypeError)
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.acos(nil) }.should raise_error(TypeError)
+ -> { Math.acos(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/acosh_spec.rb b/spec/ruby/core/math/acosh_spec.rb
index 26c18a530f..6707de95d3 100644
--- a/spec/ruby/core/math/acosh_spec.rb
+++ b/spec/ruby/core/math/acosh_spec.rb
@@ -12,13 +12,13 @@ describe "Math.acosh" do
end
it "raises Math::DomainError if the passed argument is less than -1.0 or greater than 1.0" do
- lambda { Math.acosh(1.0 - TOLERANCE) }.should raise_error(Math::DomainError)
- lambda { Math.acosh(0) }.should raise_error(Math::DomainError)
- lambda { Math.acosh(-1.0) }.should raise_error(Math::DomainError)
+ -> { Math.acosh(1.0 - TOLERANCE) }.should raise_error(Math::DomainError)
+ -> { Math.acosh(0) }.should raise_error(Math::DomainError)
+ -> { Math.acosh(-1.0) }.should raise_error(Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.acosh("test") }.should raise_error(TypeError)
+ -> { Math.acosh("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -26,7 +26,7 @@ describe "Math.acosh" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.acosh(nil) }.should raise_error(TypeError)
+ -> { Math.acosh(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/asin_spec.rb b/spec/ruby/core/math/asin_spec.rb
index 8591ea80ea..3a674a1147 100644
--- a/spec/ruby/core/math/asin_spec.rb
+++ b/spec/ruby/core/math/asin_spec.rb
@@ -17,15 +17,15 @@ describe "Math.asin" do
end
it "raises an Math::DomainError if the argument is greater than 1.0" do
- lambda { Math.asin(1.0001) }.should raise_error( Math::DomainError)
+ -> { Math.asin(1.0001) }.should raise_error( Math::DomainError)
end
it "raises an Math::DomainError if the argument is less than -1.0" do
- lambda { Math.asin(-1.0001) }.should raise_error( Math::DomainError)
+ -> { Math.asin(-1.0001) }.should raise_error( Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.asin("test") }.should raise_error(TypeError)
+ -> { Math.asin("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -33,7 +33,7 @@ describe "Math.asin" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.asin(nil) }.should raise_error(TypeError)
+ -> { Math.asin(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/asinh_spec.rb b/spec/ruby/core/math/asinh_spec.rb
index 66a2beaa36..ff8210df0a 100644
--- a/spec/ruby/core/math/asinh_spec.rb
+++ b/spec/ruby/core/math/asinh_spec.rb
@@ -19,7 +19,7 @@ describe "Math.asinh" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.asinh("test") }.should raise_error(TypeError)
+ -> { Math.asinh("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -27,7 +27,7 @@ describe "Math.asinh" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.asinh(nil) }.should raise_error(TypeError)
+ -> { Math.asinh(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/atan2_spec.rb b/spec/ruby/core/math/atan2_spec.rb
index da1b3476cc..d4ef369d2a 100644
--- a/spec/ruby/core/math/atan2_spec.rb
+++ b/spec/ruby/core/math/atan2_spec.rb
@@ -14,15 +14,15 @@ describe "Math.atan2" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.atan2(1.0, "test") }.should raise_error(TypeError)
- lambda { Math.atan2("test", 0.0) }.should raise_error(TypeError)
- lambda { Math.atan2("test", "this") }.should raise_error(TypeError)
+ -> { Math.atan2(1.0, "test") }.should raise_error(TypeError)
+ -> { Math.atan2("test", 0.0) }.should raise_error(TypeError)
+ -> { Math.atan2("test", "this") }.should raise_error(TypeError)
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.atan2(nil, 1.0) }.should raise_error(TypeError)
- lambda { Math.atan2(-1.0, nil) }.should raise_error(TypeError)
- lambda { Math.atan2(nil, nil) }.should raise_error(TypeError)
+ -> { Math.atan2(nil, 1.0) }.should raise_error(TypeError)
+ -> { Math.atan2(-1.0, nil) }.should raise_error(TypeError)
+ -> { Math.atan2(nil, nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/atan_spec.rb b/spec/ruby/core/math/atan_spec.rb
index 9a9791266b..15edf68c05 100644
--- a/spec/ruby/core/math/atan_spec.rb
+++ b/spec/ruby/core/math/atan_spec.rb
@@ -17,7 +17,7 @@ describe "Math.atan" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.atan("test") }.should raise_error(TypeError)
+ -> { Math.atan("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -25,7 +25,7 @@ describe "Math.atan" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.atan(nil) }.should raise_error(TypeError)
+ -> { Math.atan(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/cbrt_spec.rb b/spec/ruby/core/math/cbrt_spec.rb
index 8c96243658..01cf923c71 100644
--- a/spec/ruby/core/math/cbrt_spec.rb
+++ b/spec/ruby/core/math/cbrt_spec.rb
@@ -14,11 +14,11 @@ describe "Math.cbrt" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.cbrt("foobar") }.should raise_error(TypeError)
+ -> { Math.cbrt("foobar") }.should raise_error(TypeError)
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.cbrt(nil) }.should raise_error(TypeError)
+ -> { Math.cbrt(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/cos_spec.rb b/spec/ruby/core/math/cos_spec.rb
index cd27b99794..3ba7a54c38 100644
--- a/spec/ruby/core/math/cos_spec.rb
+++ b/spec/ruby/core/math/cos_spec.rb
@@ -17,7 +17,7 @@ describe "Math.cos" do
it "raises a TypeError unless the argument is Numeric and has #to_f" do
- lambda { Math.cos("test") }.should raise_error(TypeError)
+ -> { Math.cos("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -25,7 +25,7 @@ describe "Math.cos" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.cos(nil) }.should raise_error(TypeError)
+ -> { Math.cos(nil) }.should raise_error(TypeError)
end
it "coerces its argument with #to_f" do
diff --git a/spec/ruby/core/math/cosh_spec.rb b/spec/ruby/core/math/cosh_spec.rb
index 14d4c2fe0f..049e117e56 100644
--- a/spec/ruby/core/math/cosh_spec.rb
+++ b/spec/ruby/core/math/cosh_spec.rb
@@ -14,7 +14,7 @@ describe "Math.cosh" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.cosh("test") }.should raise_error(TypeError)
+ -> { Math.cosh("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -22,7 +22,7 @@ describe "Math.cosh" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.cosh(nil) }.should raise_error(TypeError)
+ -> { Math.cosh(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/erf_spec.rb b/spec/ruby/core/math/erf_spec.rb
index 96757e412d..b4e6248e43 100644
--- a/spec/ruby/core/math/erf_spec.rb
+++ b/spec/ruby/core/math/erf_spec.rb
@@ -21,7 +21,7 @@ describe "Math.erf" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.erf("test") }.should raise_error(TypeError)
+ -> { Math.erf("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -29,7 +29,7 @@ describe "Math.erf" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.erf(nil) }.should raise_error(TypeError)
+ -> { Math.erf(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/erfc_spec.rb b/spec/ruby/core/math/erfc_spec.rb
index eca23eaf7c..e465f5cf58 100644
--- a/spec/ruby/core/math/erfc_spec.rb
+++ b/spec/ruby/core/math/erfc_spec.rb
@@ -20,7 +20,7 @@ describe "Math.erfc" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.erfc("test") }.should raise_error(TypeError)
+ -> { Math.erfc("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -28,7 +28,7 @@ describe "Math.erfc" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.erfc(nil) }.should raise_error(TypeError)
+ -> { Math.erfc(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/exp_spec.rb b/spec/ruby/core/math/exp_spec.rb
index d97550dc4e..36eb49a8c7 100644
--- a/spec/ruby/core/math/exp_spec.rb
+++ b/spec/ruby/core/math/exp_spec.rb
@@ -14,7 +14,7 @@ describe "Math.exp" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.exp("test") }.should raise_error(TypeError)
+ -> { Math.exp("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -22,7 +22,7 @@ describe "Math.exp" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.exp(nil) }.should raise_error(TypeError)
+ -> { Math.exp(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/frexp_spec.rb b/spec/ruby/core/math/frexp_spec.rb
index 31b5b4079f..7dfb493d20 100644
--- a/spec/ruby/core/math/frexp_spec.rb
+++ b/spec/ruby/core/math/frexp_spec.rb
@@ -9,7 +9,7 @@ describe "Math.frexp" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.frexp("test") }.should raise_error(TypeError)
+ -> { Math.frexp("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -18,7 +18,7 @@ describe "Math.frexp" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.frexp(nil) }.should raise_error(TypeError)
+ -> { Math.frexp(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/gamma_spec.rb b/spec/ruby/core/math/gamma_spec.rb
index ce7f82421f..386162a087 100644
--- a/spec/ruby/core/math/gamma_spec.rb
+++ b/spec/ruby/core/math/gamma_spec.rb
@@ -51,7 +51,7 @@ describe "Math.gamma" do
end
it "raises Math::DomainError given -1" do
- lambda { Math.gamma(-1) }.should raise_error(Math::DomainError)
+ -> { Math.gamma(-1) }.should raise_error(Math::DomainError)
end
# See https://bugs.ruby-lang.org/issues/10642
@@ -60,7 +60,7 @@ describe "Math.gamma" do
end
it "raises Math::DomainError given negative infinity" do
- lambda { Math.gamma(-Float::INFINITY) }.should raise_error(Math::DomainError)
+ -> { Math.gamma(-Float::INFINITY) }.should raise_error(Math::DomainError)
end
it "returns NaN given NaN" do
diff --git a/spec/ruby/core/math/hypot_spec.rb b/spec/ruby/core/math/hypot_spec.rb
index 20badb2840..3e0ce74597 100644
--- a/spec/ruby/core/math/hypot_spec.rb
+++ b/spec/ruby/core/math/hypot_spec.rb
@@ -16,7 +16,7 @@ describe "Math.hypot" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.hypot("test", "this") }.should raise_error(TypeError)
+ -> { Math.hypot("test", "this") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -26,7 +26,7 @@ describe "Math.hypot" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.hypot(nil, nil) }.should raise_error(TypeError)
+ -> { Math.hypot(nil, nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/ldexp_spec.rb b/spec/ruby/core/math/ldexp_spec.rb
index 8602b33d43..fb7799cf26 100644
--- a/spec/ruby/core/math/ldexp_spec.rb
+++ b/spec/ruby/core/math/ldexp_spec.rb
@@ -15,7 +15,7 @@ describe "Math.ldexp" do
end
it "raises a TypeError if the first argument cannot be coerced with Float()" do
- lambda { Math.ldexp("test", 2) }.should raise_error(TypeError)
+ -> { Math.ldexp("test", 2) }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -23,19 +23,19 @@ describe "Math.ldexp" do
end
it "raises RangeError if NaN is given as the second arg" do
- lambda { Math.ldexp(0, nan_value) }.should raise_error(RangeError)
+ -> { Math.ldexp(0, nan_value) }.should raise_error(RangeError)
end
it "raises a TypeError if the second argument cannot be coerced with Integer()" do
- lambda { Math.ldexp(3.2, "this") }.should raise_error(TypeError)
+ -> { Math.ldexp(3.2, "this") }.should raise_error(TypeError)
end
it "raises a TypeError if the first argument is nil" do
- lambda { Math.ldexp(nil, 2) }.should raise_error(TypeError)
+ -> { Math.ldexp(nil, 2) }.should raise_error(TypeError)
end
it "raises a TypeError if the second argument is nil" do
- lambda { Math.ldexp(3.1, nil) }.should raise_error(TypeError)
+ -> { Math.ldexp(3.1, nil) }.should raise_error(TypeError)
end
it "accepts any first argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/lgamma_spec.rb b/spec/ruby/core/math/lgamma_spec.rb
index a20d0a4f2f..33e7836448 100644
--- a/spec/ruby/core/math/lgamma_spec.rb
+++ b/spec/ruby/core/math/lgamma_spec.rb
@@ -40,7 +40,7 @@ describe "Math.lgamma" do
end
it "raises Math::DomainError when passed -Infinity" do
- lambda { Math.lgamma(-infinity_value) }.should raise_error(Math::DomainError)
+ -> { Math.lgamma(-infinity_value) }.should raise_error(Math::DomainError)
end
it "returns [Infinity, 1] when passed Infinity" do
diff --git a/spec/ruby/core/math/log10_spec.rb b/spec/ruby/core/math/log10_spec.rb
index 2c594999b7..c4daedcd5c 100644
--- a/spec/ruby/core/math/log10_spec.rb
+++ b/spec/ruby/core/math/log10_spec.rb
@@ -16,11 +16,11 @@ describe "Math.log10" do
end
it "raises an Math::DomainError if the argument is less than 0" do
- lambda { Math.log10(-1e-15) }.should raise_error(Math::DomainError)
+ -> { Math.log10(-1e-15) }.should raise_error(Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.log10("test") }.should raise_error(TypeError)
+ -> { Math.log10("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -28,7 +28,7 @@ describe "Math.log10" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.log10(nil) }.should raise_error(TypeError)
+ -> { Math.log10(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/log2_spec.rb b/spec/ruby/core/math/log2_spec.rb
index 8a7c582f92..1594f2d7af 100644
--- a/spec/ruby/core/math/log2_spec.rb
+++ b/spec/ruby/core/math/log2_spec.rb
@@ -16,15 +16,15 @@ describe "Math.log2" do
end
it "raises an Errno::EDOM if the argument is less than 0" do
- lambda { Math.log2(-1e-15) }.should raise_error( Math::DomainError)
+ -> { Math.log2(-1e-15) }.should raise_error( Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.log2("test") }.should raise_error(TypeError)
+ -> { Math.log2("test") }.should raise_error(TypeError)
end
it "raises a TypeError if passed a numerical argument as a string" do
- lambda { Math.log2("1.0") }.should raise_error(TypeError)
+ -> { Math.log2("1.0") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -32,7 +32,7 @@ describe "Math.log2" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.log2(nil) }.should raise_error(TypeError)
+ -> { Math.log2(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/log_spec.rb b/spec/ruby/core/math/log_spec.rb
index c09e270c06..6c5036ba81 100644
--- a/spec/ruby/core/math/log_spec.rb
+++ b/spec/ruby/core/math/log_spec.rb
@@ -16,15 +16,15 @@ describe "Math.log" do
end
it "raises an Math::DomainError if the argument is less than 0" do
- lambda { Math.log(-1e-15) }.should raise_error(Math::DomainError)
+ -> { Math.log(-1e-15) }.should raise_error(Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.log("test") }.should raise_error(TypeError)
+ -> { Math.log("test") }.should raise_error(TypeError)
end
it "raises a TypeError for numerical values passed as string" do
- lambda { Math.log("10") }.should raise_error(TypeError)
+ -> { Math.log("10") }.should raise_error(TypeError)
end
it "accepts a second argument for the base" do
@@ -33,8 +33,8 @@ describe "Math.log" do
end
it "raises a TypeError when the numerical base cannot be coerced to a float" do
- lambda { Math.log(10, "2") }.should raise_error(TypeError)
- lambda { Math.log(10, nil) }.should raise_error(TypeError)
+ -> { Math.log(10, "2") }.should raise_error(TypeError)
+ -> { Math.log(10, nil) }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -42,7 +42,7 @@ describe "Math.log" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.log(nil) }.should raise_error(TypeError)
+ -> { Math.log(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/sin_spec.rb b/spec/ruby/core/math/sin_spec.rb
index 96bef5fed1..8e944bc95f 100644
--- a/spec/ruby/core/math/sin_spec.rb
+++ b/spec/ruby/core/math/sin_spec.rb
@@ -16,7 +16,7 @@ describe "Math.sin" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.sin("test") }.should raise_error(TypeError)
+ -> { Math.sin("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -24,7 +24,7 @@ describe "Math.sin" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.sin(nil) }.should raise_error(TypeError)
+ -> { Math.sin(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/sinh_spec.rb b/spec/ruby/core/math/sinh_spec.rb
index e0fa0c99e9..027c2395a7 100644
--- a/spec/ruby/core/math/sinh_spec.rb
+++ b/spec/ruby/core/math/sinh_spec.rb
@@ -14,7 +14,7 @@ describe "Math.sinh" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.sinh("test") }.should raise_error(TypeError)
+ -> { Math.sinh("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -22,7 +22,7 @@ describe "Math.sinh" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.sinh(nil) }.should raise_error(TypeError)
+ -> { Math.sinh(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/sqrt_spec.rb b/spec/ruby/core/math/sqrt_spec.rb
index 50fd132b2a..779aea2a0a 100644
--- a/spec/ruby/core/math/sqrt_spec.rb
+++ b/spec/ruby/core/math/sqrt_spec.rb
@@ -13,7 +13,7 @@ describe "Math.sqrt" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.sqrt("test") }.should raise_error(TypeError)
+ -> { Math.sqrt("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -21,7 +21,7 @@ describe "Math.sqrt" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.sqrt(nil) }.should raise_error(TypeError)
+ -> { Math.sqrt(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/tan_spec.rb b/spec/ruby/core/math/tan_spec.rb
index 031fe75085..c7b188cd81 100644
--- a/spec/ruby/core/math/tan_spec.rb
+++ b/spec/ruby/core/math/tan_spec.rb
@@ -19,7 +19,7 @@ describe "Math.tan" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.tan("test") }.should raise_error(TypeError)
+ -> { Math.tan("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -27,7 +27,7 @@ describe "Math.tan" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.tan(nil) }.should raise_error(TypeError)
+ -> { Math.tan(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do
diff --git a/spec/ruby/core/math/tanh_spec.rb b/spec/ruby/core/math/tanh_spec.rb
index 699d882ee8..568f8dfa77 100644
--- a/spec/ruby/core/math/tanh_spec.rb
+++ b/spec/ruby/core/math/tanh_spec.rb
@@ -16,7 +16,7 @@ describe "Math.tanh" do
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.tanh("test") }.should raise_error(TypeError)
+ -> { Math.tanh("test") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -24,7 +24,7 @@ describe "Math.tanh" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.tanh(nil) }.should raise_error(TypeError)
+ -> { Math.tanh(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do