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

ruby-changes:72238

From: Nobuyoshi <ko1@a...>
Date: Sun, 19 Jun 2022 11:06:56 +0900 (JST)
Subject: [ruby-changes:72238] 5f8c73405e (master): [ruby/etc] [DOC] Markup constant path names

https://git.ruby-lang.org/ruby.git/commit/?id=5f8c73405e

From 5f8c73405ec9c5a642b208b23bf1b55b8e8f2045 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 19 Jun 2022 10:59:03 +0900
Subject: [ruby/etc] [DOC] Markup constant path names

https://github.com/ruby/etc/commit/6c9a0b4e5d
---
 ext/etc/etc.c | 56 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 31 insertions(+), 25 deletions(-)

diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 51b8ad3e3b..4cd941f586 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -190,7 +190,8 @@ setup_passwd(struct passwd *pwd) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L190
 /* call-seq:
  *	getpwuid(uid)	->  Passwd
  *
- * Returns the /etc/passwd information for the user with the given integer +uid+.
+ * Returns the <tt>/etc/passwd</tt> information for the user with the given
+ * integer +uid+.
  *
  * The information is returned as a Passwd struct.
  *
@@ -229,8 +230,8 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L230
 /* call-seq:
  *	getpwnam(name)	->  Passwd
  *
- * Returns the /etc/passwd information for the user with specified login
- * +name+.
+ * Returns the <tt>/etc/passwd</tt> information for the user with specified
+ * login +name+.
  *
  * The information is returned as a Passwd struct.
  *
@@ -295,7 +296,7 @@ each_passwd(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L296
  *	Etc.passwd			->  Passwd
  *
  * Provides a convenient Ruby iterator which executes a block for each entry
- * in the /etc/passwd file.
+ * in the <tt>/etc/passwd</tt> file.
  *
  * The code block is passed an Passwd struct.
  *
@@ -330,7 +331,8 @@ etc_passwd(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L331
  *	Etc::Passwd.each { |struct| block }	->  Passwd
  *	Etc::Passwd.each			->  Enumerator
  *
- * Iterates for each entry in the /etc/passwd file if a block is given.
+ * Iterates for each entry in the <tt>/etc/passwd</tt> file if a block is
+ * given.
  *
  * If no block is given, returns the Enumerator.
  *
@@ -360,8 +362,8 @@ etc_each_passwd(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L362
     return obj;
 }
 
-/* Resets the process of reading the /etc/passwd file, so that the next call
- * to ::getpwent will return the first entry again.
+/* Resets the process of reading the <tt>/etc/passwd</tt> file, so that the
+ * next call to ::getpwent will return the first entry again.
  */
 static VALUE
 etc_setpwent(VALUE obj)
@@ -372,8 +374,8 @@ etc_setpwent(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L374
     return Qnil;
 }
 
-/* Ends the process of scanning through the /etc/passwd file begun with
- * ::getpwent, and closes the file.
+/* Ends the process of scanning through the <tt>/etc/passwd</tt> file begun
+ * with ::getpwent, and closes the file.
  */
 static VALUE
 etc_endpwent(VALUE obj)
@@ -384,7 +386,7 @@ etc_endpwent(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L386
     return Qnil;
 }
 
-/* Returns an entry from the /etc/passwd file.
+/* Returns an entry from the <tt>/etc/passwd</tt> file.
  *
  * The first time it is called it opens the file and returns the first entry;
  * each successive call returns the next entry, or +nil+ if the end of the file
@@ -435,7 +437,7 @@ setup_group(struct group *grp) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L437
  *	getgrgid(group_id)  ->	Group
  *
  * Returns information about the group with specified integer +group_id+,
- * as found in /etc/group.
+ * as found in <tt>/etc/group</tt>.
  *
  * The information is returned as a Group struct.
  *
@@ -473,7 +475,7 @@ etc_getgrgid(int argc, VALUE *argv, VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L475
  *	getgrnam(name)	->  Group
  *
  * Returns information about the group with specified +name+, as found in
- * /etc/group.
+ * <tt>/etc/group</tt>.
  *
  * The information is returned as a Group struct.
  *
@@ -536,7 +538,7 @@ each_group(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L538
 #endif
 
 /* Provides a convenient Ruby iterator which executes a block for each entry
- * in the /etc/group file.
+ * in the <tt>/etc/group</tt> file.
  *
  * The code block is passed an Group struct.
  *
@@ -572,7 +574,8 @@ etc_group(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L574
  *	Etc::Group.each { |group| block }   ->	obj
  *	Etc::Group.each			    ->	Enumerator
  *
- * Iterates for each entry in the /etc/group file if a block is given.
+ * Iterates for each entry in the <tt>/etc/group</tt> file if a block is
+ * given.
  *
  * If no block is given, returns the Enumerator.
  *
@@ -599,8 +602,8 @@ etc_each_group(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L602
 }
 #endif
 
-/* Resets the process of reading the /etc/group file, so that the next call
- * to ::getgrent will return the first entry again.
+/* Resets the process of reading the <tt>/etc/group</tt> file, so that the
+ * next call to ::getgrent will return the first entry again.
  */
 static VALUE
 etc_setgrent(VALUE obj)
@@ -611,8 +614,8 @@ etc_setgrent(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L614
     return Qnil;
 }
 
-/* Ends the process of scanning through the /etc/group file begun by
- * ::getgrent, and closes the file.
+/* Ends the process of scanning through the <tt>/etc/group</tt> file begun
+ * by ::getgrent, and closes the file.
  */
 static VALUE
 etc_endgrent(VALUE obj)
@@ -623,7 +626,7 @@ etc_endgrent(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L626
     return Qnil;
 }
 
-/* Returns an entry from the /etc/group file.
+/* Returns an entry from the <tt>/etc/group</tt> file.
  *
  * The first time it is called it opens the file and returns the first entry;
  * each successive call returns the next entry, or +nil+ if the end of the file
@@ -657,9 +660,11 @@ VALUE rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc); https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L660
 /*
  * Returns system configuration directory.
  *
- * This is typically "/etc", but is modified by the prefix used when Ruby was
- * compiled. For example, if Ruby is built and installed in /usr/local,
- * returns "/usr/local/etc" on other platforms than Windows.
+ * This is typically <code>"/etc"</code>, but is modified by the prefix used
+ * when Ruby was compiled. For example, if Ruby is built and installed in
+ * <tt>/usr/local</tt>, returns <code>"/usr/local/etc"</code> on other
+ * platforms than Windows.
+ *
  * On Windows, this always returns the directory provided by the system.
  */
 static VALUE
@@ -1067,11 +1072,12 @@ etc_nprocessors(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L1072
 
 /*
  * The Etc module provides access to information typically stored in
- * files in the /etc directory on Unix systems.
+ * files in the <tt>/etc</tt> directory on Unix systems.
  *
  * The information accessible consists of the information found in the
- * /etc/passwd and /etc/group files, plus information about the system's
- * temporary directory (/tmp) and configuration directory (/etc).
+ * <tt>/etc/passwd</tt> and <tt>/etc/group</tt> files, plus information
+ * about the system's temporary directory (<tt>/tmp</tt>) and configuration
+ * directory (<tt>/etc</tt>).
  *
  * The Etc module provides a more reliable way to access information about
  * the logged in user than environment variables such as +$USER+.
-- 
cgit v1.2.1


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

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