mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@4ce9f41
This commit is contained in:
parent
267bed0cd9
commit
727c97da19
108 changed files with 1325 additions and 270 deletions
|
|
@ -47,7 +47,9 @@ describe :integer_exponent, shared: true do
|
|||
end
|
||||
|
||||
it "returns Float::INFINITY when the number is too big" do
|
||||
2.send(@method, 427387904).should == Float::INFINITY
|
||||
-> {
|
||||
2.send(@method, 427387904).should == Float::INFINITY
|
||||
}.should complain(/warning: in a\*\*b, b may be too big/)
|
||||
end
|
||||
|
||||
it "raises a ZeroDivisionError for 0 ** -1" do
|
||||
|
|
@ -105,7 +107,10 @@ describe :integer_exponent, shared: true do
|
|||
end
|
||||
|
||||
it "switch to a Float when the values is too big" do
|
||||
flt = @bignum.send(@method, @bignum)
|
||||
flt = nil
|
||||
-> {
|
||||
flt = @bignum.send(@method, @bignum)
|
||||
}.should complain(/warning: in a\*\*b, b may be too big/)
|
||||
flt.should be_kind_of(Float)
|
||||
flt.infinite?.should == 1
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue