I would like to capture calls to eval.
I tried using trace points which does get pretty close:
@call_trace = TracePoint.new(:c_call) do |trace_point|
if trace_point.method_id == :eval
# How to get args?
I also tried to override Kernel.eval but that didn't seem to work correctly
either. I might be doing something wrong.
Any ideas or suggestions would be greatly appreciated.