[前][次][番号順一覧][スレッド一覧]

ruby-changes:50279

From: nobu <ko1@a...>
Date: Tue, 13 Feb 2018 22:30:04 +0900 (JST)
Subject: [ruby-changes:50279] nobu:r62397 (trunk): Fixing some minimal formating on enum.c examples

nobu	2018-02-13 22:29:57 +0900 (Tue, 13 Feb 2018)

  New Revision: 62397

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62397

  Log:
    Fixing some minimal formating on enum.c examples
    
    This will fix the formatting shown on detect|find and revese_arch
    generated by RDoc.
    
    [Fix GH-1816]
    
    From: Espartaco Palma <esparta@g...>

  Modified files:
    trunk/enum.c
Index: enum.c
===================================================================
--- enum.c	(revision 62396)
+++ enum.c	(revision 62397)
@@ -249,13 +249,13 @@ find_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, mem https://github.com/ruby/ruby/blob/trunk/enum.c#L249
  *
  *  If no block is given, an enumerator is returned instead.
  *
- *     (1..100).detect  => #<Enumerator: 1..100:detect>
- *     (1..100).find    => #<Enumerator: 1..100:find>
+ *     (1..100).detect  #=> #<Enumerator: 1..100:detect>
+ *     (1..100).find    #=> #<Enumerator: 1..100:find>
  *
- *     (1..10).detect	{ |i| i % 5 == 0 and i % 7 == 0 }   #=> nil
- *     (1..10).find	{ |i| i % 5 == 0 and i % 7 == 0 }   #=> nil
- *     (1..100).detect	{ |i| i % 5 == 0 and i % 7 == 0 }   #=> 35
- *     (1..100).find	{ |i| i % 5 == 0 and i % 7 == 0 }   #=> 35
+ *     (1..10).detect   { |i| i % 5 == 0 and i % 7 == 0 }   #=> nil
+ *     (1..10).find     { |i| i % 5 == 0 and i % 7 == 0 }   #=> nil
+ *     (1..100).detect  { |i| i % 5 == 0 and i % 7 == 0 }   #=> 35
+ *     (1..100).find    { |i| i % 5 == 0 and i % 7 == 0 }   #=> 35
  *
  */
 
@@ -2274,13 +2274,13 @@ enum_each_with_index(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/enum.c#L2274
  *
  *  If no block is given, an enumerator is returned instead.
  *
- *      (1..3).reverse_each { |v| p v }
+ *     (1..3).reverse_each { |v| p v }
  *
- *    produces:
+ *  produces:
  *
- *      3
- *      2
- *      1
+ *     3
+ *     2
+ *     1
  */
 
 static VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]