diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | doc/extension.ja.rdoc | 8 | ||||
-rw-r--r-- | doc/extension.rdoc | 9 |
3 files changed, 16 insertions, 8 deletions
@@ -1,3 +1,10 @@ +Wed Nov 2 08:45:49 2016 Dmitry Gritsay <unseductable@gmail.com> + + * 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] + Wed Nov 2 07:34:27 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> * numeric.c (rb_num_coerce_bit): enable bit operations with diff --git a/doc/extension.ja.rdoc b/doc/extension.ja.rdoc index e5772a62f1..5657de9ba7 100644 --- a/doc/extension.ja.rdoc +++ b/doc/extension.ja.rdoc @@ -1499,12 +1499,12 @@ VALUE rb_yield(VALUE val) :: 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) :: 関数func1をarg1を引数に呼び出す.func1の実行中に例外が発生 - した時には func2をarg2を引数として呼ぶ.戻り値は例外が発生 - しなかった時はfunc1の戻り値, 例外が発生した時にはfunc2の戻 - り値である. + した時には func2をarg2を第一引数, 発生した例外オブジェクト + を第二引数として呼ぶ.戻り値は例外が発生しなかった時はfunc1 + の戻り値, 例外が発生した時にはfunc2の戻り値である. VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) :: 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) :: |