Skip to content
  • Jeremy Evans's avatar
    9c1d32a7
    Make TracePoint#enable with block target current thread by default · 9c1d32a7
    Jeremy Evans authored
    If TracePoint#enable is passed a block, it previously started
    the trace on all threads.  This changes it to trace only the
    current thread by default.  To limit the scope of the change,
    the current thread is only used by default if target and
    target_line are both nil.  You can pass target_thread: nil
    to enable tracing on all threads, to get the previous
    default behavior.
    
    Fixes [Bug #16889]
    9c1d32a7
    Make TracePoint#enable with block target current thread by default
    Jeremy Evans authored
    If TracePoint#enable is passed a block, it previously started
    the trace on all threads.  This changes it to trace only the
    current thread by default.  To limit the scope of the change,
    the current thread is only used by default if target and
    target_line are both nil.  You can pass target_thread: nil
    to enable tracing on all threads, to get the previous
    default behavior.
    
    Fixes [Bug #16889]
Loading