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

ruby-changes:48596

From: stomar <ko1@a...>
Date: Wed, 8 Nov 2017 05:52:39 +0900 (JST)
Subject: [ruby-changes:48596] stomar:r60711 (trunk): pathname.c: improve docs for Pathname

stomar	2017-11-08 05:14:46 +0900 (Wed, 08 Nov 2017)

  New Revision: 60711

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

  Log:
    pathname.c: improve docs for Pathname
    
    * ext/pathname/pathname.c: [DOC] improve example for Pathname.glob,
      by using a more common glob pattern, and improve the reference
      to the `base' keyword argument for Pathname#glob.

  Modified files:
    trunk/ext/pathname/pathname.c
Index: ext/pathname/pathname.c
===================================================================
--- ext/pathname/pathname.c	(revision 60710)
+++ ext/pathname/pathname.c	(revision 60711)
@@ -1083,8 +1083,8 @@ s_glob_i(RB_BLOCK_CALL_FUNC_ARGLIST(elt, https://github.com/ruby/ruby/blob/trunk/ext/pathname/pathname.c#L1083
 /*
  * Returns or yields Pathname objects.
  *
- *  Pathname.glob("config/?*.rb")
- *	#=> [#<Pathname:config/environment.rb>, #<Pathname:config/routes.rb>, ..]
+ *  Pathname.glob("lib/i*.rb")
+ *	#=> [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
  *
  * See Dir.glob.
  */
@@ -1126,7 +1126,7 @@ glob_i(RB_BLOCK_CALL_FUNC_ARGLIST(elt, s https://github.com/ruby/ruby/blob/trunk/ext/pathname/pathname.c#L1126
  *  #=> [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
  *
  * See Dir.glob.
- * This method uses base: argument of Dir.glob.
+ * This method uses the +base+ keyword argument of Dir.glob.
  */
 static VALUE
 path_glob(int argc, VALUE *argv, VALUE self)

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

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