diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -97,6 +97,15 @@ rb_obj_equal(VALUE obj1, VALUE obj2) return Qfalse; } +/* + * Generates a <code>Fixnum</code> hash value for this object. This function must have the + * property that a.eql?(b) implies a.hash <code>==</code> b.hash. The hash value is used by + * class <code>Hash</code>. Any hash value that exceeds the capacity of a <code>Fixnum</code> will be + * truncated before being used. + * + * "waffle" #=> "waffle" + * "waffle".hash #=> -910576647 + */ VALUE rb_obj_hash(VALUE obj) { @@ -1774,10 +1783,10 @@ rb_mod_const_defined(int argc, VALUE *argv, VALUE mod) return RTEST(recur) ? rb_const_defined(mod, id) : rb_const_defined_at(mod, id); } -VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj); -VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj); -VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj); -VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj); +VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj); /* in class.c */ +VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj); /* in class.c */ +VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj); /* in class.c */ +VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj); /* in class.c */ /* * call-seq: |