patch File#foreach