mirror of
https://github.com/ruby/ruby.git
synced 2026-01-29 13:34:17 +00:00
11 lines
167 B
Ruby
11 lines
167 B
Ruby
require 'continuation'
|
|
cont = nil
|
|
a = [*1..10].reject do |i|
|
|
callcc {|c| cont = c} if !cont and i == 10
|
|
false
|
|
end
|
|
if a.size < 1000
|
|
a.unshift(:x)
|
|
cont.call
|
|
end
|