diff options
Diffstat (limited to 'spec/ruby/library/complex')
-rw-r--r-- | spec/ruby/library/complex/math/shared/acos.rb | 6 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/acosh.rb | 8 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/asin.rb | 6 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/asinh.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/atan.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/atan2.rb | 6 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/atanh.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/cos.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/cosh.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/exp.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/log.rb | 4 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/log10.rb | 4 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/sin.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/sinh.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/sqrt.rb | 6 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/tan.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/complex/math/shared/tanh.rb | 2 |
17 files changed, 30 insertions, 30 deletions
diff --git a/spec/ruby/library/complex/math/shared/acos.rb b/spec/ruby/library/complex/math/shared/acos.rb index 61be31571f..65637fa838 100644 --- a/spec/ruby/library/complex/math/shared/acos.rb +++ b/spec/ruby/library/complex/math/shared/acos.rb @@ -28,14 +28,14 @@ describe :complex_math_acos_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:acos!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:acos!, Complex(4, 5)) }.should raise_error(TypeError) end it "raises an Errno::EDOM for numbers greater than 1.0" do - lambda { @object.send(:acos!, 1.0001) }.should raise_error(Errno::EDOM) + -> { @object.send(:acos!, 1.0001) }.should raise_error(Errno::EDOM) end it "raises an Errno::EDOM for numbers less than -1.0" do - lambda { @object.send(:acos!, -1.0001) }.should raise_error(Errno::EDOM) + -> { @object.send(:acos!, -1.0001) }.should raise_error(Errno::EDOM) end end diff --git a/spec/ruby/library/complex/math/shared/acosh.rb b/spec/ruby/library/complex/math/shared/acosh.rb index a2cd887f95..285b0b823f 100644 --- a/spec/ruby/library/complex/math/shared/acosh.rb +++ b/spec/ruby/library/complex/math/shared/acosh.rb @@ -26,12 +26,12 @@ describe :complex_math_acosh_bang, shared: true do end it "raises Errno::EDOM for numbers less than 1.0" do - lambda { @object.send(:acosh!, 1.0 - TOLERANCE) }.should raise_error(Errno::EDOM) - lambda { @object.send(:acosh!, 0) }.should raise_error(Errno::EDOM) - lambda { @object.send(:acosh!, -1.0) }.should raise_error(Errno::EDOM) + -> { @object.send(:acosh!, 1.0 - TOLERANCE) }.should raise_error(Errno::EDOM) + -> { @object.send(:acosh!, 0) }.should raise_error(Errno::EDOM) + -> { @object.send(:acosh!, -1.0) }.should raise_error(Errno::EDOM) end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:acosh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:acosh!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/asin.rb b/spec/ruby/library/complex/math/shared/asin.rb index 1705745210..91fed7aa06 100644 --- a/spec/ruby/library/complex/math/shared/asin.rb +++ b/spec/ruby/library/complex/math/shared/asin.rb @@ -34,14 +34,14 @@ describe :complex_math_asin_bang, shared: true do end it "raises an Errno::EDOM if the argument is greater than 1.0" do - lambda { @object.send(:asin!, 1.0001) }.should raise_error( Errno::EDOM) + -> { @object.send(:asin!, 1.0001) }.should raise_error( Errno::EDOM) end it "raises an Errno::EDOM if the argument is less than -1.0" do - lambda { @object.send(:asin!, -1.0001) }.should raise_error( Errno::EDOM) + -> { @object.send(:asin!, -1.0001) }.should raise_error( Errno::EDOM) end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:asin!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:asin!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/asinh.rb b/spec/ruby/library/complex/math/shared/asinh.rb index b4256e7475..b4ddd3a22e 100644 --- a/spec/ruby/library/complex/math/shared/asinh.rb +++ b/spec/ruby/library/complex/math/shared/asinh.rb @@ -27,6 +27,6 @@ describe :complex_math_asinh_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:asinh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:asinh!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/atan.rb b/spec/ruby/library/complex/math/shared/atan.rb index 46c1897407..63a496e841 100644 --- a/spec/ruby/library/complex/math/shared/atan.rb +++ b/spec/ruby/library/complex/math/shared/atan.rb @@ -27,6 +27,6 @@ describe :complex_math_atan_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:atan!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:atan!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/atan2.rb b/spec/ruby/library/complex/math/shared/atan2.rb index 3305d695c5..6d89423924 100644 --- a/spec/ruby/library/complex/math/shared/atan2.rb +++ b/spec/ruby/library/complex/math/shared/atan2.rb @@ -27,8 +27,8 @@ describe :complex_math_atan2_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:atan2!, Complex(4, 5), Complex(4, 5)) }.should raise_error(TypeError) - lambda { @object.send(:atan2!, 4, Complex(4, 5)) }.should raise_error(TypeError) - lambda { @object.send(:atan2!, Complex(4, 5), 5) }.should raise_error(TypeError) + -> { @object.send(:atan2!, Complex(4, 5), Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:atan2!, 4, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:atan2!, Complex(4, 5), 5) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/atanh.rb b/spec/ruby/library/complex/math/shared/atanh.rb index ebd4d7c223..ae80e61bec 100644 --- a/spec/ruby/library/complex/math/shared/atanh.rb +++ b/spec/ruby/library/complex/math/shared/atanh.rb @@ -25,6 +25,6 @@ end describe :complex_math_atanh_no_complex, shared: true do it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:atanh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:atanh!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/cos.rb b/spec/ruby/library/complex/math/shared/cos.rb index ddd8512231..31cb5ab1e5 100644 --- a/spec/ruby/library/complex/math/shared/cos.rb +++ b/spec/ruby/library/complex/math/shared/cos.rb @@ -25,6 +25,6 @@ describe :complex_math_cos_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:cos!, Complex(3, 4)) }.should raise_error(TypeError) + -> { @object.send(:cos!, Complex(3, 4)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/cosh.rb b/spec/ruby/library/complex/math/shared/cosh.rb index a56a655cd5..7cf561c985 100644 --- a/spec/ruby/library/complex/math/shared/cosh.rb +++ b/spec/ruby/library/complex/math/shared/cosh.rb @@ -23,6 +23,6 @@ describe :complex_math_cosh_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:cosh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:cosh!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/exp.rb b/spec/ruby/library/complex/math/shared/exp.rb index 91ab5739be..6715ac63d3 100644 --- a/spec/ruby/library/complex/math/shared/exp.rb +++ b/spec/ruby/library/complex/math/shared/exp.rb @@ -23,6 +23,6 @@ describe :complex_math_exp_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:exp!, Complex(1, 3)) }.should raise_error(TypeError) + -> { @object.send(:exp!, Complex(1, 3)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/log.rb b/spec/ruby/library/complex/math/shared/log.rb index f3aad0d66a..4b23e8c5f2 100644 --- a/spec/ruby/library/complex/math/shared/log.rb +++ b/spec/ruby/library/complex/math/shared/log.rb @@ -30,10 +30,10 @@ describe :complex_math_log_bang, shared: true do end it "raises an Errno::EDOM if the argument is less than 0" do - lambda { @object.send(:log!, -10) }.should raise_error(Errno::EDOM) + -> { @object.send(:log!, -10) }.should raise_error(Errno::EDOM) end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:log!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:log!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/log10.rb b/spec/ruby/library/complex/math/shared/log10.rb index a2cf5344bf..f49934d958 100644 --- a/spec/ruby/library/complex/math/shared/log10.rb +++ b/spec/ruby/library/complex/math/shared/log10.rb @@ -32,10 +32,10 @@ describe :complex_math_log10_bang, shared: true do end it "raises an Errno::EDOM when the passed argument is negative" do - lambda { @object.send(:log10!, -10) }.should raise_error(Errno::EDOM) + -> { @object.send(:log10!, -10) }.should raise_error(Errno::EDOM) end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:log10!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:log10!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/sin.rb b/spec/ruby/library/complex/math/shared/sin.rb index 418ba5d810..1cb1b29cda 100644 --- a/spec/ruby/library/complex/math/shared/sin.rb +++ b/spec/ruby/library/complex/math/shared/sin.rb @@ -25,6 +25,6 @@ describe :complex_math_sin_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:sin!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:sin!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/sinh.rb b/spec/ruby/library/complex/math/shared/sinh.rb index bd85bd0799..de80a376da 100644 --- a/spec/ruby/library/complex/math/shared/sinh.rb +++ b/spec/ruby/library/complex/math/shared/sinh.rb @@ -23,6 +23,6 @@ describe :complex_math_sinh_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:sinh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:sinh!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/sqrt.rb b/spec/ruby/library/complex/math/shared/sqrt.rb index b6a289c3f9..23b1ba48ff 100644 --- a/spec/ruby/library/complex/math/shared/sqrt.rb +++ b/spec/ruby/library/complex/math/shared/sqrt.rb @@ -24,11 +24,11 @@ describe :complex_math_sqrt_bang, shared: true do end it "raises Errno::EDOM when the passed argument is negative" do - lambda { @object.send(:sqrt!, -4) }.should raise_error(Errno::EDOM) - lambda { @object.send(:sqrt!, -19.36) }.should raise_error(Errno::EDOM) + -> { @object.send(:sqrt!, -4) }.should raise_error(Errno::EDOM) + -> { @object.send(:sqrt!, -19.36) }.should raise_error(Errno::EDOM) end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:sqrt!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:sqrt!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/tan.rb b/spec/ruby/library/complex/math/shared/tan.rb index df7a6ff19b..9022c84fc9 100644 --- a/spec/ruby/library/complex/math/shared/tan.rb +++ b/spec/ruby/library/complex/math/shared/tan.rb @@ -23,6 +23,6 @@ describe :complex_math_tan_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:tan!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:tan!, Complex(4, 5)) }.should raise_error(TypeError) end end diff --git a/spec/ruby/library/complex/math/shared/tanh.rb b/spec/ruby/library/complex/math/shared/tanh.rb index 7bf07f9a3f..f2c9a5abb1 100644 --- a/spec/ruby/library/complex/math/shared/tanh.rb +++ b/spec/ruby/library/complex/math/shared/tanh.rb @@ -27,6 +27,6 @@ describe :complex_math_tanh_bang, shared: true do end it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:tanh!, Complex(4, 5)) }.should raise_error(TypeError) + -> { @object.send(:tanh!, Complex(4, 5)) }.should raise_error(TypeError) end end |