module TestProf::RSpecDissect::MemoizedInstrumentation

def fetch_or_store(id, *)

:nodoc:
def fetch_or_store(id, *)
  res = nil
  Thread.current[:_rspec_dissect_let_depth] ||= 0
  Thread.current[:_rspec_dissect_let_depth] += 1
  begin
    res = if Thread.current[:_rspec_dissect_let_depth] == 1
      RSpecDissect.track(:let, id) { super }
    else
      super
    end
  ensure
    Thread.current[:_rspec_dissect_let_depth] -= 1
  end
  res
end