summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/merge_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/merge_spec.rb')
-rw-r--r--spec/ruby/core/hash/merge_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/ruby/core/hash/merge_spec.rb b/spec/ruby/core/hash/merge_spec.rb
index 5ea70610be..e90beae87a 100644
--- a/spec/ruby/core/hash/merge_spec.rb
+++ b/spec/ruby/core/hash/merge_spec.rb
@@ -69,9 +69,12 @@ describe "Hash#merge" do
result.should == { a: 1, b: 2, c: 3, d: 4 }
end
- it "accepts zero arguments and returns self" do
+ it "accepts zero arguments and returns a copy of self" do
hash = { a: 1 }
- hash.merge.should eql(hash)
+ merged = hash.merge
+
+ merged.should eql(hash)
+ merged.should_not equal(hash)
end
end
end