module BinData
def trace_reading(io = STDERR, &block)
If +block+ is given then the tracing only occurs for that block.
Turn on trace information when reading a BinData object.
def trace_reading(io = STDERR, &block) @tracer = Tracer.new(io) BasePrimitive.turn_on_tracing Choice.turn_on_tracing if block_given? begin block.call ensure BasePrimitive.turn_off_tracing Choice.turn_off_tracing @tracer = nil end end end