ruby-changes:66514
From: Jeremy <ko1@a...>
Date: Sat, 19 Jun 2021 10:55:44 +0900 (JST)
Subject: [ruby-changes:66514] 72a4e1d3bb (master): Tweak description of TracePoint :line event
https://git.ruby-lang.org/ruby.git/commit/?id=72a4e1d3bb From 72a4e1d3bbbdfff71ec2c6b2ddb3b9323193cacd Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Fri, 18 Jun 2021 11:57:55 -0700 Subject: Tweak description of TracePoint :line event "code" here is too ambiguous. TracePoint events only occur if there is a new statement or expression on that line, not if the line is a continuation of a previous statement or expression and there is no new statement or expression on the line. For example: ``` [ foo, # start of expression, line event bar # continuation of expression, no line event ] [ foo, # start of expression, line event (bar) # new expression, line event ] foo( # start of expression, line event bar # continuation of expression, no line event ) foo( # start of expression, line event (bar) # new expression, line event ) ``` Fixes [Bug #15634] --- trace_point.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace_point.rb b/trace_point.rb index 2e85369..4272448 100644 --- a/trace_point.rb +++ b/trace_point.rb @@ -31,7 +31,7 @@ https://github.com/ruby/ruby/blob/trunk/trace_point.rb#L31 # # To filter what is traced, you can pass any of the following as +events+: # -# +:line+:: execute code on a new line +# +:line+:: execute an expression or statement on a new line # +:class+:: start a class or module definition # +:end+:: finish a class or module definition # +:call+:: call a Ruby method -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/