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

ruby-changes:45463

From: normal <ko1@a...>
Date: Sun, 5 Feb 2017 09:22:09 +0900 (JST)
Subject: [ruby-changes:45463] normal:r57536 (trunk): doc: Add example for Symbol#to_s

normal	2017-02-05 09:22:03 +0900 (Sun, 05 Feb 2017)

  New Revision: 57536

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

  Log:
    doc: Add example for Symbol#to_s
    
    * string.c: add example for Symbol#to_s.
    
    The docs for Symbol#to_s only include an example for
    Symbol#id2name, but not for #to_s which is an alias;
    the docs should include examples for both methods.
    
    From: Marcus Stollsteimer <sto.mar@w...>

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 57535)
+++ string.c	(revision 57536)
@@ -9707,6 +9707,7 @@ sym_inspect(VALUE sym) https://github.com/ruby/ruby/blob/trunk/string.c#L9707
  *  Returns the name or string corresponding to <i>sym</i>.
  *
  *     :fred.id2name   #=> "fred"
+ *     :ginger.to_s    #=> "ginger"
  */
 
 

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

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