diff options
Diffstat (limited to 'spec/ruby/core/objectspace/weakmap/shared')
| -rw-r--r-- | spec/ruby/core/objectspace/weakmap/shared/each.rb | 2 | ||||
| -rw-r--r-- | spec/ruby/core/objectspace/weakmap/shared/include.rb | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/spec/ruby/core/objectspace/weakmap/shared/each.rb b/spec/ruby/core/objectspace/weakmap/shared/each.rb index 3d43a19347..771c416dde 100644 --- a/spec/ruby/core/objectspace/weakmap/shared/each.rb +++ b/spec/ruby/core/objectspace/weakmap/shared/each.rb @@ -5,6 +5,6 @@ describe :weakmap_each, shared: true do ref = "x" map.send(@method).should == map map[key] = ref - -> { map.send(@method) }.should raise_error(LocalJumpError) + -> { map.send(@method) }.should.raise(LocalJumpError) end end diff --git a/spec/ruby/core/objectspace/weakmap/shared/include.rb b/spec/ruby/core/objectspace/weakmap/shared/include.rb index f9c174b6d1..1770eeac8b 100644 --- a/spec/ruby/core/objectspace/weakmap/shared/include.rb +++ b/spec/ruby/core/objectspace/weakmap/shared/include.rb @@ -20,15 +20,11 @@ describe :weakmap_include?, shared: true do map.send(@method, key2).should == false end - ruby_version_is "2.7" do - ruby_bug "#16826", "2.7.0"..."2.7.2" do - it "reports true if the pair exists and the value is nil" do - map = ObjectSpace::WeakMap.new - key = Object.new - map[key] = nil - map.size.should == 1 - map.send(@method, key).should == true - end - end + it "reports true if the pair exists and the value is nil" do + map = ObjectSpace::WeakMap.new + key = Object.new + map[key] = nil + map.size.should == 1 + map.send(@method, key).should == true end end |
