replaces Pathname#(dirname|realpath) with File.$1

Simpler, thanks to @rubys for the hint.
use unified and clean formatting in CHANGELOGS. [ci skip]
Merge pull request #10190 from senny/changelog_cleanup

Use unified and clean formatting in CHANGELOGS. [ci skip]