method
any?
v2_4_6 -
Show latest stable
- Class:
Hash
any?()public
See also Enumerable#any?
static VALUE
rb_hash_any_p(VALUE hash)
{
VALUE ret = Qfalse;
if (RHASH_EMPTY_P(hash)) return Qfalse;
if (!rb_block_given_p()) {
/* yields pairs, never false */
return Qtrue;
}
if (rb_block_arity() > 1)
rb_hash_foreach(hash, any_p_i_fast, (VALUE)&ret);
else
rb_hash_foreach(hash, any_p_i, (VALUE)&ret);
return ret;
} Related methods
- Instance methods
- <
- <=
- ==
- >
- >=
- []
- []=
- any?
- assoc
- clear
- compact
- compact!
- compare_by_identity
- compare_by_identity?
- default
- default=
- default_proc
- default_proc=
- delete
- delete_if
- dig
- each
- each_key
- each_pair
- each_value
- empty?
- eql?
- fetch
- fetch_values
- flatten
- has_key?
- has_value?
- hash
- include?
- index
- initialize_copy
- inspect
- invert
- keep_if
- key
- key?
- keys
- length
- member?
- merge
- merge!
- pretty_print
- pretty_print_cycle
- rassoc
- rehash
- reject
- reject!
- replace
- select
- select!
- shift
- size
- store
- to_a
- to_h
- to_hash
- to_proc
- to_s
- transform_values
- transform_values!
- update
- value?
- values
- values_at
- Class methods
- []
- new
- try_convert