summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-06-27 15:51:37 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-06-27 15:51:37 +0200
commitb3fa158d1c4d8e03b8dc04f1e4f9940a8a4ef44c (patch)
treefa8a62d6192c24a21e70aa02589507adfe4e4e6a /spec/ruby/core/integer
parent64d8c0815e6ab042e8a67a670bda9f34404fa662 (diff)
Update to ruby/spec@b6b7752
Diffstat (limited to 'spec/ruby/core/integer')
-rw-r--r--spec/ruby/core/integer/pow_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/pow_spec.rb b/spec/ruby/core/integer/pow_spec.rb
index d7561baf96..4712911095 100644
--- a/spec/ruby/core/integer/pow_spec.rb
+++ b/spec/ruby/core/integer/pow_spec.rb
@@ -43,5 +43,9 @@ describe "Integer#pow" do
it "raises a ZeroDivisionError when the given argument is 0" do
-> { 2.pow(5, 0) }.should raise_error(ZeroDivisionError)
end
+
+ it "raises a RangeError when the first argument is negative and the second argument is present" do
+ -> { 2.pow(-5, 1) }.should raise_error(RangeError)
+ end
end
end