Sha256: 208dd30e048f5f3242854244b036357683937c18e8bba521f116777300681d57
Contents?: true
Size: 483 Bytes
Versions: 19
Compression:
Stored size: 483 Bytes
Contents
class ClosedQueueError < StandardError; end module Puma # Queue#close was added in Ruby 2.3. # Add a simple implementation for earlier Ruby versions. # module QueueClose def initialize @closed = false super end def close @closed = true end def closed? @closed end def push(object) @closed ||= false raise ClosedQueueError if @closed super end alias << push end ::Queue.prepend QueueClose end
Version data entries
19 entries across 16 versions & 2 rubygems