summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:58:32 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:58:32 +0000
commitfecc53f0ecbcc514a63d7f3eba3ee0342bbe870d (patch)
tree889ae8454d6b27fb4b80b87e3849630764c07ce3 /proc.c
parente9650c0b077707168095891af6419ca148b94b38 (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/branches/ruby_1_9_2@27673 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.