mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@b65d01f
This commit is contained in:
parent
15d05f8120
commit
6998d75824
186 changed files with 3956 additions and 3339 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue