summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/hash_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/hash_spec.rb')
-rw-r--r--spec/ruby/core/hash/hash_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/core/hash/hash_spec.rb b/spec/ruby/core/hash/hash_spec.rb
index 3649d4d8de..cd67f7a652 100644
--- a/spec/ruby/core/hash/hash_spec.rb
+++ b/spec/ruby/core/hash/hash_spec.rb
@@ -41,4 +41,11 @@ describe "Hash#hash" do
h.hash.should == {x: [h]}.hash
# Like above, because h.eql?(x: [h])
end
+
+ it "allows omitting values" do
+ a = 1
+ b = 2
+
+ {a:, b:}.should == { a: 1, b: 2 }
+ end
end