normandy/examples/range_over_channels.rb
2015-12-15 13:50:47 +01:00

10 lines
158 B
Ruby

# https://gobyexample.com/range-over-channels
require 'channel'
queue = Channel.new(2)
queue << 'one'
queue << 'two'
queue.close
queue.each { |e| puts e }