Project

General

Profile

Feature #8921

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

=begin 
 It would be really handy if for instance (({select})) `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 ``` 

Back