clear -> ()
キューを空にします。返り値は不定です。
例 q = Queue.new [:resource1, :resource2, :resource3, nil].each { |r| q.push(r) } q.length # => 4 q.clear q.length # => 0
q = Queue.new [:resource1, :resource2, :resource3, nil].each { |r| q.push(r) } q.length # => 4 q.clear q.length # => 0