1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2021-07-29 22:11:21 +02:00
parent 15d05f8120
commit 6998d75824
186 changed files with 3956 additions and 3339 deletions

View file

@ -81,19 +81,17 @@ describe "Hash#merge" do
merge_pairs.should == expected_pairs
end
ruby_version_is "2.6" do
it "accepts multiple hashes" do
result = { a: 1 }.merge({ b: 2 }, { c: 3 }, { d: 4 })
result.should == { a: 1, b: 2, c: 3, d: 4 }
end
it "accepts multiple hashes" do
result = { a: 1 }.merge({ b: 2 }, { c: 3 }, { d: 4 })
result.should == { a: 1, b: 2, c: 3, d: 4 }
end
it "accepts zero arguments and returns a copy of self" do
hash = { a: 1 }
merged = hash.merge
it "accepts zero arguments and returns a copy of self" do
hash = { a: 1 }
merged = hash.merge
merged.should eql(hash)
merged.should_not equal(hash)
end
merged.should eql(hash)
merged.should_not equal(hash)
end
end