From 56557ec28a8712984a0e9744fd7547e797ec9b6b Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Mar 2019 11:04:59 +0000 Subject: [DOC] fix markups [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 3348fd59e8..1dbedb763f 100644 --- a/dir.c +++ b/dir.c @@ -592,11 +592,10 @@ dir_initialize(int argc, VALUE *argv, VALUE dir) * The optional encoding keyword argument specifies the encoding of the directory. * If not specified, the filesystem encoding is used. * - * With no block, open is a synonym for - * Dir::new. If a block is present, it is passed - * aDir as a parameter. The directory is closed at the end of - * the block, and Dir::open returns the value of the - * block. + * With no block, open is a synonym for Dir::new. If a + * block is present, it is passed aDir as a parameter. The + * directory is closed at the end of the block, and Dir::open returns + * the value of the block. */ static VALUE dir_s_open(int argc, VALUE *argv, VALUE klass) @@ -870,8 +869,7 @@ dir_each_entry(VALUE dir, VALUE (*each)(VALUE, VALUE), VALUE arg, int children_o * dir.pos -> integer * dir.tell -> integer * - * Returns the current position in dir. See also - * Dir#seek. + * Returns the current position in dir. See also Dir#seek. * * d = Dir.new("testdir") * d.tell #=> 0 @@ -898,7 +896,7 @@ dir_tell(VALUE dir) * dir.seek( integer ) -> dir * * Seeks to a particular location in dir. integer - * must be a value returned by Dir#tell. + * must be a value returned by Dir#tell. * * d = Dir.new("testdir") #=> # * d.read #=> "." @@ -926,8 +924,7 @@ dir_seek(VALUE dir, VALUE pos) * call-seq: * dir.pos = integer -> integer * - * Synonym for Dir#seek, but returns the position - * parameter. + * Synonym for Dir#seek, but returns the position parameter. * * d = Dir.new("testdir") #=> # * d.read #=> "." @@ -1044,8 +1041,8 @@ chdir_restore(struct chdir_data *args) * Changes the current working directory of the process to the given * string. When called without an argument, changes the directory to * the value of the environment variable HOME, or - * LOGDIR. SystemCallError (probably - * Errno::ENOENT) if the target directory does not exist. + * LOGDIR. SystemCallError (probably Errno::ENOENT) if + * the target directory does not exist. * * If a block is given, it is passed the name of the new current * directory, and the block is executed with that as the current @@ -1242,11 +1239,10 @@ nogvl_mkdir(void *ptr) * * Makes a new directory named by string, with permissions * specified by the optional parameter anInteger. The - * permissions may be modified by the value of - * File::umask, and are ignored on NT. Raises a - * SystemCallError if the directory cannot be created. See - * also the discussion of permissions in the class documentation for - * File. + * permissions may be modified by the value of File::umask, and are + * ignored on NT. Raises a SystemCallError if the directory cannot be + * created. See also the discussion of permissions in the class + * documentation for File. * * Dir.mkdir(File.join(Dir.home, ".foo"), 0700) #=> 0 * @@ -1288,8 +1284,8 @@ nogvl_rmdir(void *ptr) * Dir.rmdir( string ) -> 0 * Dir.unlink( string ) -> 0 * - * Deletes the named directory. Raises a subclass of - * SystemCallError if the directory isn't empty. + * Deletes the named directory. Raises a subclass of SystemCallError + * if the directory isn't empty. */ static VALUE dir_s_rmdir(VALUE obj, VALUE dir) @@ -2974,8 +2970,8 @@ dir_collect(VALUE dir) * Dir.entries( dirname, encoding: enc ) -> array * * Returns an array containing all of the filenames in the given - * directory. Will raise a SystemCallError if the named - * directory doesn't exist. + * directory. Will raise a SystemCallError if the named directory + * doesn't exist. * * The optional encoding keyword argument specifies the encoding of the * directory. If not specified, the filesystem encoding is used. @@ -3082,8 +3078,8 @@ dir_collect_children(VALUE dir) * Dir.children( dirname, encoding: enc ) -> array * * Returns an array containing all of the filenames except for "." - * and ".." in the given directory. Will raise a - * SystemCallError if the named directory doesn't exist. + * and ".." in the given directory. Will raise a SystemCallError if + * the named directory doesn't exist. * * The optional encoding keyword argument specifies the encoding of the * directory. If not specified, the filesystem encoding is used. @@ -3390,10 +3386,9 @@ rb_dir_s_empty_p(VALUE obj, VALUE dirname) } /* - * Objects of class Dir are directory streams representing - * directories in the underlying file system. They provide a variety of - * ways to list directories and their contents. See also - * File. + * Objects of class Dir are directory streams representing + * directories in the underlying file system. They provide a variety + * of ways to list directories and their contents. See also File. * * The directory used in these examples contains the two regular files * (config.h and main.rb), the parent -- cgit v1.2.3