Read The First Line From A File
File.read('README.md').split(/\n/).first> File.open('README.md', &:readline).strip
=> "# TIL"
> File.open('README.md', &:gets).strip
=> "# TIL"Last updated
File.read('README.md').split(/\n/).first> File.open('README.md', &:readline).strip
=> "# TIL"
> File.open('README.md', &:gets).strip
=> "# TIL"Last updated