aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
authora_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 06:49:50 +0000
committera_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 06:49:50 +0000
commit59ec0e0c3812c71886cbd265e84d82fa2b4ed8a3 (patch)
tree205309a26521602e72f9e7a47a5b2b83156e8bc4 /vm_trace.c
parent3a8a8824dbc1ead40d56a900e03deef4a5a50b63 (diff)
downloadruby-59ec0e0c3812c71886cbd265e84d82fa2b4ed8a3.tar.gz
Fix example that trace method is called outside block
[ci skip] `TracePoint` doesn't have the `line` method. Therefore, this example will raise `NoMethodError`. But since it does not seem to be the intended error, use the existing `lineno` method instead. Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1731 [Fix GH-1731] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c
index bedcb82ebb..87d6e53345 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1263,7 +1263,7 @@ rb_tracepoint_new(VALUE target_thval, rb_event_flag_t events, void (*func)(VALUE
* TracePoint.trace(:line) do |tp|
* $tp = tp
* end
- * $tp.line #=> access from outside (RuntimeError)
+ * $tp.lineno #=> access from outside (RuntimeError)
*
* Access from other threads is also forbidden.
*