@@ -1165,7 +1165,7 @@ def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
1165
1165
#
1166
1166
# Keyword arguments:
1167
1167
#
1168
- # - <tt>force: true</tt> - ignores raised exceptions of Errno::ENOENT
1168
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
1169
1169
# and its descendants.
1170
1170
# - <tt>noop: true</tt> - does not remove files; returns +nil+.
1171
1171
# - <tt>verbose: true</tt> - prints an equivalent command:
@@ -1248,7 +1248,7 @@ def rm_f(list, noop: nil, verbose: nil)
1248
1248
#
1249
1249
# Keyword arguments:
1250
1250
#
1251
- # - <tt>force: true</tt> - ignores raised exceptions of Errno::ENOENT
1251
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
1252
1252
# and its descendants.
1253
1253
# - <tt>noop: true</tt> - does not remove entries; returns +nil+.
1254
1254
# - <tt>secure: true</tt> - removes +src+ securely;
@@ -1315,7 +1315,7 @@ def rm_rf(list, noop: nil, verbose: nil, secure: nil)
1315
1315
# see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
1316
1316
#
1317
1317
# Optional argument +force+ specifies whether to ignore
1318
- # raised exceptions of Errno::ENOENT and its descendants.
1318
+ # raised exceptions of StandardError and its descendants.
1319
1319
#
1320
1320
# Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
1321
1321
#
@@ -1384,12 +1384,10 @@ def remove_entry_secure(path, force = false)
1384
1384
ent . remove
1385
1385
rescue
1386
1386
raise unless force
1387
- raise unless Errno ::ENOENT === $!
1388
1387
end
1389
1388
end
1390
1389
rescue
1391
1390
raise unless force
1392
- raise unless Errno ::ENOENT === $!
1393
1391
end
1394
1392
module_function :remove_entry_secure
1395
1393
@@ -1415,7 +1413,7 @@ def fu_stat_identical_entry?(a, b) #:nodoc:
1415
1413
# should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
1416
1414
#
1417
1415
# Optional argument +force+ specifies whether to ignore
1418
- # raised exceptions of Errno::ENOENT and its descendants.
1416
+ # raised exceptions of StandardError and its descendants.
1419
1417
#
1420
1418
# Related: FileUtils.remove_entry_secure.
1421
1419
#
@@ -1425,12 +1423,10 @@ def remove_entry(path, force = false)
1425
1423
ent . remove
1426
1424
rescue
1427
1425
raise unless force
1428
- raise unless Errno ::ENOENT === $!
1429
1426
end
1430
1427
end
1431
1428
rescue
1432
1429
raise unless force
1433
- raise unless Errno ::ENOENT === $!
1434
1430
end
1435
1431
module_function :remove_entry
1436
1432
@@ -1441,15 +1437,14 @@ def remove_entry(path, force = false)
1441
1437
# should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
1442
1438
#
1443
1439
# Optional argument +force+ specifies whether to ignore
1444
- # raised exceptions of Errno::ENOENT and its descendants.
1440
+ # raised exceptions of StandardError and its descendants.
1445
1441
#
1446
1442
# Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
1447
1443
#
1448
1444
def remove_file ( path , force = false )
1449
1445
Entry_ . new ( path ) . remove_file
1450
1446
rescue
1451
1447
raise unless force
1452
- raise unless Errno ::ENOENT === $!
1453
1448
end
1454
1449
module_function :remove_file
1455
1450
@@ -1461,7 +1456,7 @@ def remove_file(path, force = false)
1461
1456
# should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
1462
1457
#
1463
1458
# Optional argument +force+ specifies whether to ignore
1464
- # raised exceptions of Errno::ENOENT and its descendants.
1459
+ # raised exceptions of StandardError and its descendants.
1465
1460
#
1466
1461
# Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
1467
1462
#
0 commit comments