From: "nobu (Nobuyoshi Nakada)" Date: 2013-09-19T08:21:56+09:00 Subject: [ruby-core:57271] [ruby-trunk - Feature #8921] Allow select, reject, etc to accept a regex Issue #8921 has been updated by nobu (Nobuyoshi Nakada). That is grep. ---------------------------------------- Feature #8921: Allow select, reject, etc to accept a regex https://bugs.ruby-lang.org/issues/8921#change-41888 Author: kyledecot (Kyle Decot) Status: Open Priority: Normal Assignee: Category: Target version: =begin It would be really handy if for instance (({select})) could accept a regex. For example %w[foo bar baz].select /^ba/ # ["bar", "baz"] I know that this is currently possible via the slightly longer syntax %w[foo bar baz].select{|i| i[/^ba/] } # ["bar", "baz"] =end -- http://bugs.ruby-lang.org/