lib/trace_eval.rb in trace_eval-0.1.4 vs lib/trace_eval.rb in trace_eval-0.1.5
- old
+ new
@@ -12,18 +12,15 @@
lines = [
"__wzpxmnrjafemvlrwflblbbyenywk__ = #{__wzpxmnrjafemvlrwflblbbyenywk__}\n"
] + code.lines
tp = TracePoint.new(:line) do |tp|
- tp.disable
next unless tp.path == '(eval)'
next unless tp.binding.local_variable_get(
:__wzpxmnrjafemvlrwflblbbyenywk__
)==__wzpxmnrjafemvlrwflblbbyenywk__
$stderr.print lines[tp.lineno]
rescue NameError
- ensure
- tp.enable
end
begin
tp.enable
eval code