Skip to content

Instantly share code, notes, and snippets.

@nolan
Created December 18, 2012 15:32
Show Gist options
  • Save nolan/4328987 to your computer and use it in GitHub Desktop.
Save nolan/4328987 to your computer and use it in GitHub Desktop.
Determine the length of the longest string in an array
def longest(a)
a.map(&:length).max
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment