diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 05:31:28 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 05:31:28 +0000 |
commit | 354907d0f6a4344fdd626c4a267f23ee33e86e6e (patch) | |
tree | d6308233d12a29e1b4fdf6cf19402013600028d3 | |
parent | c58dc636862b79c97d32d056d816c24f2aa13d58 (diff) | |
download | ruby-354907d0f6a4344fdd626c4a267f23ee33e86e6e.tar.gz |
* vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | vm_backtrace.c | 23 |
2 files changed, 24 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Mon Jun 17 14:27:54 2013 Zachary Scott <zachary@zacharyscott.net> + + * vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1 + Mon Jun 17 13:04:01 2013 Akinori MUSHA <knu@iDaemons.org> * tool/ifchange (until): Fix the condition, although harmless in diff --git a/vm_backtrace.c b/vm_backtrace.c index 1cc0d07f12..3287c1f950 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -177,10 +177,27 @@ location_label(rb_backtrace_location_t *loc) * * Usually consists of method, class, module, etc names with decoration. * - * For example, using +caller_locations.rb+ from Thread::Backtrace::Location + * Consider the following example: + * + * def foo + * puts caller_locations(0).first.label + * + * 1.times do + * puts caller_locations(0).first.label + * + * 1.times do + * puts caller_locations(0).first.label + * end + * + * end + * end + * + * The result of calling +foo+ is this: + * + * label: foo + * label: block in foo + * label: block (2 levels) in foo * - * loc = c(0..1).first - * loc.label #=> a */ static VALUE location_label_m(VALUE self) |