ruby-changes:34903
From: zzak <ko1@a...>
Date: Mon, 28 Jul 2014 06:41:03 +0900 (JST)
Subject: [ruby-changes:34903] zzak:r46986 (trunk): * vm_eval.c: [DOC] Fix rdoc formatting of patch from [Bug #9551]
zzak 2014-07-28 06:38:23 +0900 (Mon, 28 Jul 2014) New Revision: 46986 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46986 Log: * vm_eval.c: [DOC] Fix rdoc formatting of patch from [Bug #9551] Modified files: trunk/ChangeLog trunk/vm_eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46985) +++ ChangeLog (revision 46986) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jul 28 06:37:19 2014 Zachary Scott <e@z...> + + * vm_eval.c: [DOC] Fix rdoc formatting of patch from [Bug #9551] + Mon Jul 28 06:34:43 2014 Zachary Scott <e@z...> * vm_eval.c: [DOC] [Bug #9551] Improve clarity of Kernel::catch Index: vm_eval.c =================================================================== --- vm_eval.c (revision 46985) +++ vm_eval.c (revision 46986) @@ -1782,30 +1782,27 @@ catch_i(VALUE tag, VALUE data) https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1782 * call-seq: * catch([tag]) {|tag| block } -> obj * - * +catch+ executes its block. If +throw+ is not called, - * the block executes normally, and +catch+ returns the - * value of the last expression evaluated. + * +catch+ executes its block. If +throw+ is not called, the block executes + * normally, and +catch+ returns the value of the last expression evaluated. * * catch(1) { 123 } # => 123 * - * If +throw(tag2, val)+ is called, Ruby searches up its - * stack for a +catch+ block whose _tag_ has the same - * +object_id+ as _tag2_. If found, the block stops - * executing and returns _val_ (or +nil+ if no second - * argument was given to +throw+). + * If +throw(tag2, val)+ is called, Ruby searches up its stack for a +catch+ + * block whose +tag+ has the same +object_id+ as _tag2_. When found, the block + * stops executing and returns _val_ (or +nil+ if no second argument was given + * to +throw+). * * catch(1) { throw(1, 456) } # => 456 * catch(1) { throw(1) } # => nil * - * When _tag_ is passed as the first argument, +catch+ - * yields it as the parameter of the block. + * When +tag+ is passed as the first argument, +catch+ yields it as the + * parameter of the block. * * catch(1) {|x| x + 2 } # => 3 * - * When no _tag_ is given, +catch+ yields a new unique - * object (as from +Object.new+) as the block parameter. - * This object can then be used as the argument to - * +throw+, and will match the correct +catch+ block. + * When no +tag+ is given, +catch+ yields a new unique object (as from + * +Object.new+) as the block parameter. This object can then be used as the + * argument to +throw+, and will match the correct +catch+ block. * * catch do |obj_A| * catch do |obj_B| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/