From: "boris_stitnicky (Boris Stitnicky)" Date: 2013-09-19T03:37:59+09:00 Subject: [ruby-core:57269] [ruby-trunk - Feature #8921] Allow select, reject, etc to accept a regex Issue #8921 has been updated by boris_stitnicky (Boris Stitnicky). @Hanmac: That's it, thanks! ---------------------------------------- Feature #8921: Allow select, reject, etc to accept a regex https://bugs.ruby-lang.org/issues/8921#change-41887 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/