public Method

Array.reject

array.reject {|item| block }   an_array

Returns a new array containing the items in self for which the block is not true.

Source Code

/*
*  call-seq:
*     array.reject {|item| block }  -> an_array
*  
*  Returns a new array containing the items in _self_
*  for which the block is not true.
*/

static VALUE
rb_ary_reject(ary)
   VALUE ary;
{
   ary = rb_ary_dup(ary);
   rb_ary_reject_bang(ary);
   return ary;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.