<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/fileutils.rb, branch v3_0_4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Update library versions of the default gems.</title>
<updated>2020-12-22T12:45:28+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-22T12:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3'/>
<id>9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3</id>
<content type='text'>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</pre>
</div>
</content>
</entry>
<entry>
<title>Try to test with rake-13.0.2 again.</title>
<updated>2020-12-19T07:53:18+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-19T07:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=349e79bae02a8a161c06ba5f6fa203d609f6e8b9'/>
<id>349e79bae02a8a161c06ba5f6fa203d609f6e8b9</id>
<content type='text'>
  [ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f7f83918d3aa00316c8a5b959d80d7c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f7f83918d3aa00316c8a5b959d80d7c.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Make mkdir_p only attempt to create necessary directories</title>
<updated>2020-12-04T10:50:26+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2020-10-27T18:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=da126250ba31cd341b434b86047cf4ebde4e2539'/>
<id>da126250ba31cd341b434b86047cf4ebde4e2539</id>
<content type='text'>
Previously, if creating the directory directly didn't work
and the directory didn't exist, mkdir_p would create all
directories from the root.  This modifies the approach to
check whether the directory exists when walking up the
directory tree from the argument, and once you have found an
intermediate directory that exists, you only need to create
directories under it.

This approach has a couple advantages:

1) It performs better when most directories in path already exist,
and that will be true for most usage of mkdir_p, as mkdir_p is
usually called with paths where the first few directories exist
and only the last directory or last few directories do not.

2) It works in file-system access limited environments such as
when unveil(2) is used on OpenBSD.  In these environments, if
/foo/bar/baz exists and is unveiled, you can do
`mkdir /foo/bar/baz/xyz` but `mkdir /foo` and `mkdir /foo/bar` raise
Errno::ENOENT.

https://github.com/ruby/fileutils/commit/ec0c229e78
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if creating the directory directly didn't work
and the directory didn't exist, mkdir_p would create all
directories from the root.  This modifies the approach to
check whether the directory exists when walking up the
directory tree from the argument, and once you have found an
intermediate directory that exists, you only need to create
directories under it.

This approach has a couple advantages:

1) It performs better when most directories in path already exist,
and that will be true for most usage of mkdir_p, as mkdir_p is
usually called with paths where the first few directories exist
and only the last directory or last few directories do not.

2) It works in file-system access limited environments such as
when unveil(2) is used on OpenBSD.  In these environments, if
/foo/bar/baz exists and is unveiled, you can do
`mkdir /foo/bar/baz/xyz` but `mkdir /foo` and `mkdir /foo/bar` raise
Errno::ENOENT.

https://github.com/ruby/fileutils/commit/ec0c229e78
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Reduce iteration through list for `:mkdir_p`</title>
<updated>2020-09-15T11:32:13+00:00</updated>
<author>
<name>Ashwin Maroli</name>
<email>ashmaroli@users.noreply.github.com</email>
</author>
<published>2020-09-10T17:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3dd9e12b515dea2c8a14b33c762807bb54625aef'/>
<id>3dd9e12b515dea2c8a14b33c762807bb54625aef</id>
<content type='text'>
By calling the instruction to `list.map` within `list.each` itself.
https://github.com/ruby/fileutils/commit/e690eec937
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By calling the instruction to `list.map` within `list.each` itself.
https://github.com/ruby/fileutils/commit/e690eec937
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Encoding::CompatibilityError in `FileUtils::Entry_#join`</title>
<updated>2020-06-22T09:34:24+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-22T09:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6adbdb56edcf62c11229e1c9c6f75656700f1c5f'/>
<id>6adbdb56edcf62c11229e1c9c6f75656700f1c5f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug print</title>
<updated>2020-06-22T09:18:16+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-22T09:15:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ac6c967e49d1e3ad46be20aca98e8f1df2c2d5b'/>
<id>7ac6c967e49d1e3ad46be20aca98e8f1df2c2d5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix remove_entry error when path encoding is not compatible UTF-8</title>
<updated>2020-06-22T08:11:24+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-22T08:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d231b8f95b35d8a344cec4f62d7bbdf360a70e1c'/>
<id>d231b8f95b35d8a344cec4f62d7bbdf360a70e1c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"</title>
<updated>2020-06-12T10:02:50+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-06-12T10:00:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=510df47f5f7f83918d3aa00316c8a5b959d80d7c'/>
<id>510df47f5f7f83918d3aa00316c8a5b959d80d7c</id>
<content type='text'>
This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492,
because the test of rake 13.0.1 is depending on the previous
behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492,
because the test of rake 13.0.1 is depending on the previous
behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Fix #install with "X" mode option</title>
<updated>2020-06-12T09:38:49+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2019-10-02T16:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cc9ca468fecd153596c25877006f208161e477fb'/>
<id>cc9ca468fecd153596c25877006f208161e477fb</id>
<content type='text'>
`FileUtils#install` methed raises an unexpected `TypeError`, when
called with `mode:` option which has `"X"`.

```
$ ruby -rfileutils -e 'FileUtils.install("tmp/a", "tmp/b", mode: "o+X")'
/opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `directory?': no implicit conversion of File::Stat into String (TypeError)
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `block (3 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each_char'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `block (2 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each_slice'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `block in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:973:in `fu_mode'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:883:in `block in install'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1588:in `block in fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1604:in `fu_each_src_dest0'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1586:in `fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:877:in `install'
	from -e:1:in `&lt;main&gt;'
```

In spite of that `symbolic_modes_to_i` considers the `File::Stat`
`path` case at the beginning, in `"X"` case, `path` is passed to
`FileTest.directory?` method which requires a `String`.  In such
case, the mode in `path` should be examined instead.

https://github.com/ruby/fileutils/commit/af675af6b2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`FileUtils#install` methed raises an unexpected `TypeError`, when
called with `mode:` option which has `"X"`.

```
$ ruby -rfileutils -e 'FileUtils.install("tmp/a", "tmp/b", mode: "o+X")'
/opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `directory?': no implicit conversion of File::Stat into String (TypeError)
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:942:in `block (3 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each_char'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:933:in `block (2 levels) in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `each_slice'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:931:in `block in symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `each'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `inject'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:926:in `symbolic_modes_to_i'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:973:in `fu_mode'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:883:in `block in install'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1588:in `block in fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1604:in `fu_each_src_dest0'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:1586:in `fu_each_src_dest'
	from /opt/local/lib/ruby/2.7.0/fileutils.rb:877:in `install'
	from -e:1:in `&lt;main&gt;'
```

In spite of that `symbolic_modes_to_i` considers the `File::Stat`
`path` case at the beginning, in `"X"` case, `path` is passed to
`FileTest.directory?` method which requires a `String`.  In such
case, the mode in `path` should be examined instead.

https://github.com/ruby/fileutils/commit/af675af6b2
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Make verbose output go to stdout instead of stderr</title>
<updated>2020-06-12T09:38:47+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2020-03-09T16:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7cddb844e6d51f954c6669341b9cc656bd7d3492'/>
<id>7cddb844e6d51f954c6669341b9cc656bd7d3492</id>
<content type='text'>
Verbose output is not error output, and should be sent to
stdout and not stderr.

Fixes Ruby bug 4436

https://github.com/ruby/fileutils/commit/563a383025
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Verbose output is not error output, and should be sent to
stdout and not stderr.

Fixes Ruby bug 4436

https://github.com/ruby/fileutils/commit/563a383025
</pre>
</div>
</content>
</entry>
</feed>
