lib/concurrent/channel/buffer/sliding.rb in concurrent-ruby-edge-0.2.0.pre3 vs lib/concurrent/channel/buffer/sliding.rb in concurrent-ruby-edge-0.2.0.pre4
- old
+ new
@@ -43,11 +43,11 @@
false
end
# @!macro channel_buffer_put
def ns_put_onto_buffer(item)
- @buffer.shift if @buffer.size == size
- @buffer.push(item)
+ buffer.shift if buffer.size == capacity
+ buffer.push(item)
end
end
end
end
end