2
module InstanceExecHelper #:nodoc:
4
include InstanceExecHelper
5
def instance_eval_with_params(*args, &block)
7
old_critical, Thread.critical = Thread.critical, true
9
n += 1 while respond_to?(mname="__instance_exec#{n}")
10
InstanceExecHelper.module_eval{ define_method(mname, &block) }
12
Thread.critical = old_critical
15
ret = send(mname, *args)
17
InstanceExecHelper.module_eval{ remove_method(mname) } rescue nil
b'\\ No newline at end of file'