include?(p1)
public
Returns true if any member of enum equals obj. Equality
is tested using ==.
IO.constants.include? "SEEK_SET"
IO.constants.include? "SEEK_NO_FURTHER"
Show source
/*
* call-seq:
* enum.include?(obj) => true or false
* enum.member?(obj) => true or false
*
* Returns <code>true</code> if any member of <i>enum</i> equals
* <i>obj</i>. Equality is tested using <code>==</code>.
*
* IO.constants.include? "SEEK_SET" #=> true
* IO.constants.include? "SEEK_NO_FURTHER" #=> false
*
*/
static VALUE
enum_member(obj, val)
VALUE obj, val;
{
VALUE memo[2];
memo[0] = val;
memo[1] = Qfalse;
rb_iterate(rb_each, obj, member_i, (VALUE)memo);
return memo[1];
}