aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-28 12:32:31 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-28 12:32:31 +0000
commit9ab7b7ec8204ff5fbfe0838e48e771d147489d79 (patch)
treee773c245bd373dd9fa470431ddab1ed87c9faca9 /thread.c
parentb03c6a74b7fb4d58f5b554ce98f36ea3fa109475 (diff)
downloadruby-9ab7b7ec8204ff5fbfe0838e48e771d147489d79.tar.gz
* thread.c: Improve documentation for Thread#value
[Bug #10694][ruby-core:67324][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 37c7252620..b7056a764d 100644
--- a/thread.c
+++ b/thread.c
@@ -959,10 +959,14 @@ thread_join_m(int argc, VALUE *argv, VALUE self)
* call-seq:
* thr.value -> obj
*
- * Waits for +thr+ to complete, using #join, and returns its value.
+ * Waits for +thr+ to complete, using #join, and returns its value or raises
+ * the exception which terminated the thread.
*
* a = Thread.new { 2 + 2 }
* a.value #=> 4
+ *
+ * b = Thread.new { raise 'something went wrong' }
+ * b.value #=> RuntimeError: something went wrong
*/
static VALUE