mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed Kernel#rand spec
Float should not be compared by identity.
This commit is contained in:
parent
f6387ae073
commit
522adbc945
Notes:
git
2021-01-29 11:36:44 +09:00
1 changed files with 10 additions and 10 deletions
|
@ -131,8 +131,8 @@ describe "Kernel.rand" do
|
|||
x3 = Random.new(seed).rand(0.0..1)
|
||||
|
||||
x3.should be_kind_of(Float)
|
||||
x1.should equal(x3)
|
||||
x2.should equal(x3)
|
||||
x1.should eql(x3)
|
||||
x2.should eql(x3)
|
||||
|
||||
(0.0..1.0).should include(x3)
|
||||
end
|
||||
|
@ -152,8 +152,8 @@ describe "Kernel.rand" do
|
|||
x3 = Random.new(seed).rand(0.0...1)
|
||||
|
||||
x3.should be_kind_of(Float)
|
||||
x1.should equal(x3)
|
||||
x2.should equal(x3)
|
||||
x1.should eql(x3)
|
||||
x2.should eql(x3)
|
||||
|
||||
(0.0...1.0).should include(x3)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue