Method: UnboundMethod#hash
- Defined in:
- proc.c
#hash ⇒ Integer
Returns a hash value corresponding to the method object.
See also Object#hash.
1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 |
# File 'proc.c', line 1879 static VALUE method_hash(VALUE method) { struct METHOD *m; st_index_t hash; TypedData_Get_Struct(method, struct METHOD, &method_data_type, m); hash = rb_hash_start((st_index_t)m->recv); hash = rb_hash_method_entry(hash, m->me); hash = rb_hash_end(hash); return ST2FIX(hash); } |