summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-24 04:43:37 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-24 04:43:37 +0000
commitbd0880d53217e71e44952ee3dca02ea2d178e694 (patch)
tree28924d9b4b45db32573d8691adb8866fb0e95852 /thread.c
parentae155a86a9be97735602dce4534523761dd13164 (diff)
* thread.c: Documentation for Thread#backtrace_locations
[Backport #7932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index b4a3f4cb65..83c30e0ca8 100644
--- a/thread.c
+++ b/thread.c
@@ -4833,9 +4833,10 @@ rb_exec_recursive_outer(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE arg)
/*
* call-seq:
- * thr.backtrace -> array
+ * thr.backtrace -> array
+ *
+ * Returns the current backtrace of the target thread.
*
- * Returns the current back trace of the _thr_.
*/
static VALUE
@@ -4844,6 +4845,17 @@ rb_thread_backtrace_m(int argc, VALUE *argv, VALUE thval)
return vm_thread_backtrace(argc, argv, thval);
}
+/* call-seq:
+ * thr.backtrace_locations(*args) -> array or nil
+ *
+ * Returns the execution stack for the target thread---an array containing
+ * backtrace location objects.
+ *
+ * See Thread::Backtrace::Location for more information.
+ *
+ * This method behaves similarly to Kernel#caller_locations except for a
+ * specific thread.
+ */
static VALUE
rb_thread_backtrace_locations_m(int argc, VALUE *argv, VALUE thval)
{