#!/usr/bin/ruby # -*- coding: utf-8 -*- =begin 문자열 배열에서 글자 수가 5 이상인 단어만 출력 =end arr = %w[this is a test array] # select 필터 사용 arr.select { |v| v.length >= 5 } .each { |v| puts v }