ruby-changes:12114
From: yugui <ko1@a...>
Date: Sun, 21 Jun 2009 18:15:21 +0900 (JST)
Subject: [ruby-changes:12114] Ruby:r23785 (ruby_1_9_1): merges r23675 from trunk into ruby_1_9_1.
yugui 2009-06-21 18:15:04 +0900 (Sun, 21 Jun 2009) New Revision: 23785 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23785 Log: merges r23675 from trunk into ruby_1_9_1. -- * vm_eval.c (rb_f_catch): updated rdoc about generalized argument, and the case without arguments. [ruby-core:23827] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/version.h branches/ruby_1_9_1/vm_eval.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23784) +++ ruby_1_9_1/ChangeLog (revision 23785) @@ -1,3 +1,8 @@ +Sat Jun 13 07:06:54 2009 Nobuyoshi Nakada <nobu@r...> + + * vm_eval.c (rb_f_catch): updated rdoc about generalized argument, + and the case without arguments. [ruby-core:23827] + Sat Jun 13 06:45:46 2009 Nobuyoshi Nakada <nobu@r...> * vm_eval.c (rb_f_throw): fixed rdoc about execption. Index: ruby_1_9_1/vm_eval.c =================================================================== --- ruby_1_9_1/vm_eval.c (revision 23784) +++ ruby_1_9_1/vm_eval.c (revision 23785) @@ -1138,11 +1138,11 @@ /* * call-seq: - * throw(symbol [, obj]) + * throw(tag [, obj]) * * Transfers control to the end of the active +catch+ block - * waiting for _symbol_. Raises +ArgumentError+ if there - * is no +catch+ block for the symbol. The optional second + * waiting for _tag_. Raises +ArgumentError+ if there + * is no +catch+ block for the _tag_. The optional second * parameter supplies a return value for the +catch+ block, * which otherwise defaults to +nil+. For examples, see * <code>Kernel::catch</code>. @@ -1198,12 +1198,12 @@ /* * call-seq: - * catch(symbol) {| | block } > obj + * catch([arg]) {|tag| block } => obj * * +catch+ executes its block. If a +throw+ is * executed, Ruby searches up its stack for a +catch+ block * with a tag corresponding to the +throw+'s - * _symbol_. If found, that block is terminated, and + * _tag_. If found, that block is terminated, and * +catch+ returns the value given to +throw+. If * +throw+ is not called, the block terminates normally, and * the value of +catch+ is the value of the last expression @@ -1225,6 +1225,12 @@ * 2 * 1 * 0 + * + * when _arg_ is given, +catch+ yields it as is, or when no + * _arg_ is given, +catch+ assigns a new unique object to + * +throw+. this is usefull for nested +catch+. _arg_ can + * be an arbitrary object, not only Symbol. + * */ static VALUE Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 23784) +++ ruby_1_9_1/version.h (revision 23785) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-22" -#define RUBY_PATCHLEVEL 175 +#define RUBY_PATCHLEVEL 176 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/