diff options
author | Benoit Daloze <eregontp@gmail.com> | 2022-11-07 20:05:30 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2022-11-07 20:05:30 +0100 |
commit | 83decbb62b8b3f1638927033f12b55f9b11f78c6 (patch) | |
tree | 8995f5b5cdb615f3d19edded66c6a9a9e82f159c /spec/ruby/core/hash | |
parent | c99e4c427897e82a3419abed894d28705f70fa13 (diff) | |
download | ruby-83decbb62b8b3f1638927033f12b55f9b11f78c6.tar.gz |
Update to ruby/spec@740ccc8
Diffstat (limited to 'spec/ruby/core/hash')
-rw-r--r-- | spec/ruby/core/hash/hash_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/hash/hash_spec.rb b/spec/ruby/core/hash/hash_spec.rb index 3649d4d8de..2ccb483120 100644 --- a/spec/ruby/core/hash/hash_spec.rb +++ b/spec/ruby/core/hash/hash_spec.rb @@ -41,4 +41,13 @@ describe "Hash#hash" do h.hash.should == {x: [h]}.hash # Like above, because h.eql?(x: [h]) end + + ruby_version_is "3.1" do + it "allows ommiting values" do + a = 1 + b = 2 + + eval('{a:, b:}.should == { a: 1, b: 2 }') + end + end end |