Skip to content

Commit 6d0bb34

Browse files
committed
Concurrent::Map#each_pair should return enumerable when no block given
1 parent 160a457 commit 6d0bb34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/concurrent/collection/map/non_concurrent_map_backend.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def clear
9595
end
9696

9797
def each_pair
98+
return enum_for :each_pair unless block_given?
9899
dupped_backend.each_pair do |k, v|
99100
yield k, v
100101
end

0 commit comments

Comments
 (0)