summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:50:09 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:50:09 +0000
commit1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0 (patch)
tree5822fdfead1635f2f78cfd0ee69bd61c217ad07f /proc.c
parentb140b77926a6e62228f1152157d0348ff5724f89 (diff)
* error.c: RDoc for subclasses of Exception. [ruby-core:28394]
* cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index 9539f71445..30fc2475a6 100644
--- a/proc.c
+++ b/proc.c
@@ -2007,6 +2007,49 @@ proc_curry(int argc, VALUE *argv, VALUE self)
}
/*
+ * Document-class: LocalJumpError
+ *
+ * Raised when Ruby can't yield as requested.
+ *
+ * A typical scenario is attempting to yield when no block is given:
+ *
+ * def call_block
+ * yield 42
+ * end
+ * call_block
+ *
+ * <em>raises the exception:</em>
+ *
+ * LocalJumpError: no block given (yield)
+ *
+ * A more subtle example:
+ *
+ * def get_me_a_return
+ * Proc.new { return 42 }
+ * end
+ * get_me_a_return.call
+ *
+ * <em>raises the exception:</em>
+ *
+ * LocalJumpError: unexpected return
+ */
+
+/*
+ * Document-class: SystemStackError
+ *
+ * Raised in case of a stack overflow.
+ *
+ * def me_myself_and_i
+ * me_myself_and_i
+ * end
+ * me_myself_and_i
+ *
+ * <em>raises the exception:</em>
+ *
+ * SystemStackError: stack level too deep
+ */
+
+/*
* <code>Proc</code> objects are blocks of code that have been bound to
* a set of local variables. Once bound, the code may be called in
* different contexts and still access those variables.