diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-01 23:45:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-01 23:45:50 +0000 |
commit | 564cb1a0a803ad09fc40fd374037f372ffd6301f (patch) | |
tree | 44d6dea04eb7a964753f4c0295ad65d880d53e14 /doc/extension.rdoc | |
parent | 13149a59d8472db4cdd5a63a3eb2e7296e9a6713 (diff) |
extension.rdoc: update rb_rescue description
* doc/extension.rdoc: set ANYARGS as arguments for func1 and func2.
* doc/extension.rdoc: mention the exception object which is passed
to func2 as the second argument. [Fix GH-1471]
[ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/extension.rdoc')
-rw-r--r-- | doc/extension.rdoc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc index 6863665d19..8da566eceb 100644 --- a/doc/extension.rdoc +++ b/doc/extension.rdoc @@ -1523,12 +1523,13 @@ VALUE rb_yield(VALUE val) :: Evaluates the block with value val. -VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) :: +VALUE rb_rescue(VALUE (*func1)(ANYARGS), VALUE arg1, VALUE (*func2)(ANYARGS), VALUE arg2) :: Calls the function func1, with arg1 as the argument. If an exception - occurs during func1, it calls func2 with arg2 as the argument. The - return value of rb_rescue() is the return value from func1 if no - exception occurs, from func2 otherwise. + occurs during func1, it calls func2 with arg2 as the first argument + and the exception object as the second argument. The return value + of rb_rescue() is the return value from func1 if no exception occurs, + from func2 otherwise. VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) :: |