mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
10 lines
167 B
Ruby
10 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
|