free_mutant/lib/mutant/isolation/none.rb

26 lines
472 B
Ruby
Raw Normal View History

2016-02-14 16:11:32 -05:00
module Mutant
# Module providing isolation
class Isolation
Error = Class.new(RuntimeError)
# Absolutly no isolation
#
# Only useful for debugging.
class None < self
# Call block in no isolation
#
# @return [Object]
#
# @raise [Error]
# if block terminates abnormal
def call
yield
rescue => exception
raise Error, exception
end
end # None
end # Isolation
end # Mutant