aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
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..82d4c0d623 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
+ * thread.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:
+ * thread.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)
{