ensure the last line has a trailing newline #8782
diff --git a/Misc/NEWS b/Misc/NEWS
index 23b079c..768805b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,9 @@
 Library
 -------
 
+- Issue #8782: Add a trailing newline in linecache.updatecache to the last line
+  of files without one.
+
 - Issue #8729: Return NotImplemented from collections.Mapping.__eq__ when
   comparing to a non-mapping.