9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/live_ast/replace_eval.rb', line 9
def module_or_instance_eval(which, remote_self, bind, args)
handle_args(args)
cache[:remote_self] = remote_self
cache[:args] = args
code = %{
::LiveAST::ReplaceEval.cache[:remote_self].
live_ast_original_#{which}_eval %{
::LiveAST.eval(
::LiveAST::ReplaceEval.cache[:args][0],
::Kernel.binding,
*::LiveAST::ReplaceEval.cache[:args][1..-1])
}
}
live_ast_original_eval(code, bind)
ensure
cache.clear
end
|