@@ -1165,7 +1165,7 @@ def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
11651165 #
11661166 # Keyword arguments:
11671167 #
1168- # - <tt>force: true</tt> - ignores raised exceptions of Errno::ENOENT
1168+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
11691169 # and its descendants.
11701170 # - <tt>noop: true</tt> - does not remove files; returns +nil+.
11711171 # - <tt>verbose: true</tt> - prints an equivalent command:
@@ -1248,7 +1248,7 @@ def rm_f(list, noop: nil, verbose: nil)
12481248 #
12491249 # Keyword arguments:
12501250 #
1251- # - <tt>force: true</tt> - ignores raised exceptions of Errno::ENOENT
1251+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
12521252 # and its descendants.
12531253 # - <tt>noop: true</tt> - does not remove entries; returns +nil+.
12541254 # - <tt>secure: true</tt> - removes +src+ securely;
@@ -1315,7 +1315,7 @@ def rm_rf(list, noop: nil, verbose: nil, secure: nil)
13151315 # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
13161316 #
13171317 # Optional argument +force+ specifies whether to ignore
1318- # raised exceptions of Errno::ENOENT and its descendants.
1318+ # raised exceptions of StandardError and its descendants.
13191319 #
13201320 # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
13211321 #
@@ -1384,12 +1384,10 @@ def remove_entry_secure(path, force = false)
13841384 ent . remove
13851385 rescue
13861386 raise unless force
1387- raise unless Errno ::ENOENT === $!
13881387 end
13891388 end
13901389 rescue
13911390 raise unless force
1392- raise unless Errno ::ENOENT === $!
13931391 end
13941392 module_function :remove_entry_secure
13951393
@@ -1415,7 +1413,7 @@ def fu_stat_identical_entry?(a, b) #:nodoc:
14151413 # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
14161414 #
14171415 # Optional argument +force+ specifies whether to ignore
1418- # raised exceptions of Errno::ENOENT and its descendants.
1416+ # raised exceptions of StandardError and its descendants.
14191417 #
14201418 # Related: FileUtils.remove_entry_secure.
14211419 #
@@ -1425,12 +1423,10 @@ def remove_entry(path, force = false)
14251423 ent . remove
14261424 rescue
14271425 raise unless force
1428- raise unless Errno ::ENOENT === $!
14291426 end
14301427 end
14311428 rescue
14321429 raise unless force
1433- raise unless Errno ::ENOENT === $!
14341430 end
14351431 module_function :remove_entry
14361432
@@ -1441,15 +1437,14 @@ def remove_entry(path, force = false)
14411437 # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
14421438 #
14431439 # Optional argument +force+ specifies whether to ignore
1444- # raised exceptions of Errno::ENOENT and its descendants.
1440+ # raised exceptions of StandardError and its descendants.
14451441 #
14461442 # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
14471443 #
14481444 def remove_file ( path , force = false )
14491445 Entry_ . new ( path ) . remove_file
14501446 rescue
14511447 raise unless force
1452- raise unless Errno ::ENOENT === $!
14531448 end
14541449 module_function :remove_file
14551450
@@ -1461,7 +1456,7 @@ def remove_file(path, force = false)
14611456 # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
14621457 #
14631458 # Optional argument +force+ specifies whether to ignore
1464- # raised exceptions of Errno::ENOENT and its descendants.
1459+ # raised exceptions of StandardError and its descendants.
14651460 #
14661461 # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
14671462 #
0 commit comments