diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/shared/rational/exponent.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/shared/rational/exponent.rb')
| -rw-r--r-- | spec/ruby/shared/rational/exponent.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/shared/rational/exponent.rb b/spec/ruby/shared/rational/exponent.rb index ac8237c291..1d808177e9 100644 --- a/spec/ruby/shared/rational/exponent.rb +++ b/spec/ruby/shared/rational/exponent.rb @@ -66,7 +66,7 @@ describe :rational_exponent, shared: true do end it "raises ZeroDivisionError when self is Rational(0) and the exponent is negative" do - lambda { Rational(0) ** -bignum_value }.should raise_error(ZeroDivisionError) + -> { Rational(0) ** -bignum_value }.should raise_error(ZeroDivisionError) end it "returns Rational(1) when self is Rational(1)" do @@ -153,19 +153,19 @@ describe :rational_exponent, shared: true do it "raises ZeroDivisionError for Rational(0, 1) passed a negative Integer" do [-1, -4, -9999].each do |exponent| - lambda { Rational(0, 1) ** exponent }.should raise_error(ZeroDivisionError, "divided by 0") + -> { Rational(0, 1) ** exponent }.should raise_error(ZeroDivisionError, "divided by 0") end end it "raises ZeroDivisionError for Rational(0, 1) passed a negative Rational with denominator 1" do [Rational(-1, 1), Rational(-3, 1)].each do |exponent| - lambda { Rational(0, 1) ** exponent }.should raise_error(ZeroDivisionError, "divided by 0") + -> { Rational(0, 1) ** exponent }.should raise_error(ZeroDivisionError, "divided by 0") end end # #7513 it "raises ZeroDivisionError for Rational(0, 1) passed a negative Rational" do - lambda { Rational(0, 1) ** Rational(-3, 2) }.should raise_error(ZeroDivisionError, "divided by 0") + -> { Rational(0, 1) ** Rational(-3, 2) }.should raise_error(ZeroDivisionError, "divided by 0") end platform_is_not :solaris do # See https://github.com/ruby/spec/issues/134 |
