Created
December 16, 2018 21:21
-
-
Save shamritskiy3468/50e0f3fe22f003224f4d30e7b0f5b3f4 to your computer and use it in GitHub Desktop.
Task7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array_of_words = ["Words", "Sobaka", "Paralelogram", "Polundrom", "Yes", "No"] | |
puts array_of_words.sort_by { |word| word.length} |
sort_by(&:length)
???
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
А как короче это записать? sort_by { |word| word.length}