Ruby/Range/take

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Get three out of five

p (1..5).take(3)       # => [1,2,3]