Skip to content

Commit f8afda2

Browse files
authored
(Performance) Remove unnecessary syscall
1 parent 5c60da8 commit f8afda2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rake/file_task.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def needed?
1919

2020
# Time stamp for file task.
2121
def timestamp
22-
if File.exist?(name)
23-
File.mtime(name.to_s)
24-
else
22+
begin
23+
File.mtime(name)
24+
rescue Errno::ENOENT
2525
Rake::LATE
2626
end
2727
end

0 commit comments

Comments
 (0)