lib/async/channel.rb in grumlin-0.4.0 vs lib/async/channel.rb in grumlin-0.5.0
- old
+ new
@@ -43,10 +43,10 @@
each do |payload| # rubocop:disable Lint/UnreachableLoop this is intended
return payload
end
end
- def each # rubocop:disable Metrics/MethodLength
+ def each
raise(ChannelClosedError, "Cannot receive from a closed channel") if closed?
@queue.each do |type, payload|
case type
when :exception