diff options
author | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 06:49:50 +0000 |
---|---|---|
committer | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 06:49:50 +0000 |
commit | ae35d45846307ed1e17727fe2238f154d00ea67a (patch) | |
tree | 205309a26521602e72f9e7a47a5b2b83156e8bc4 /vm_trace.c | |
parent | 456327390983ebf05712f9707cf01adb4803d40a (diff) | |
download | ruby-ae35d45846307ed1e17727fe2238f154d00ea67a.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.c | 2 |
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. * |