Skip to content

Commit 2a5d205

Browse files
authored
Add missing Concurrent::Map#delete and #delete_pair signatures (#988)
1 parent 3b02215 commit 2a5d205

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

gems/concurrent-ruby/1.1/_test/map.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515

1616
map.compute_if_present(:maybe_present) { |old_value| old_value + 1 }
1717
map.compute_if_present(:a) { |_old_value| nil }
18+
19+
map.delete(:a)
20+
map.delete_pair(:b, 2)

gems/concurrent-ruby/1.1/map.rbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ module Concurrent
4848
def marshal_dump: () -> Hash[K, V]
4949
def marshal_load: (Hash[K, V] hash) -> self
5050

51+
def delete: (K key) -> V?
52+
def delete_pair: (K key, V value) -> bool
53+
5154
# undef :freeze
5255

5356
def inspect: () -> String

0 commit comments

Comments
 (0)