summaryrefslogtreecommitdiff
path: root/vm_backtrace.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 15:43:58 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-17 15:43:58 +0000
commitc03f37d6096761fb9bb0a9efc2643213f74ea675 (patch)
tree711cbbd66679ec134bef72dc1eb98ec87c623c5f /vm_backtrace.c
parente4fd9de96df71fc3a808badb8e1f96f33a27bcca (diff)
merge revision(s) 41348:
* vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r--vm_backtrace.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 15bf1633d9..6b14137acd 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)