mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
12 lines
213 B
Ruby
12 lines
213 B
Ruby
module FiberSpecs
|
|
|
|
class NewFiberToRaise
|
|
def self.raise(*args)
|
|
fiber = Fiber.new { Fiber.yield }
|
|
fiber.resume
|
|
fiber.raise(*args)
|
|
end
|
|
end
|
|
|
|
class CustomError < StandardError; end
|
|
end
|