summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-18 01:22:38 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-18 01:22:38 +0000
commitf8e79c84a90bfa32d4dd00f7d5db756239b084b7 (patch)
tree7d3856ad02f2dbf6bbafe51e1b412ccb22424e92 /bignum.c
parent1ba62fa93a200f92a8bd612a14f36a298ac4b3d1 (diff)
* bignum.c (rb_big_hash): make it public function to be available in
other source files, and remove documentation comment for Bignum#hash. * bignum.c (Bignum#hash): remove its definition because it is unified with Object#hash. * include/ruby/intern.h (rb_big_hash): add a prototype declaration. * hash.c (any_hash): treat Bignum values directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/bignum.c b/bignum.c
index 5da5813703..45be0b9cb4 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6837,16 +6837,7 @@ rb_big_aref(VALUE x, VALUE y)
return (xds[s1] & bit) ? INT2FIX(1) : INT2FIX(0);
}
-/*
- * call-seq:
- * big.hash -> fixnum
- *
- * Compute a hash based on the value of _big_.
- *
- * See also Object#hash.
- */
-
-static VALUE
+VALUE
rb_big_hash(VALUE x)
{
st_index_t hash;
@@ -7085,7 +7076,6 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "<=", big_le, 1);
rb_define_method(rb_cBignum, "===", rb_big_eq, 1);
rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1);
- rb_define_method(rb_cBignum, "hash", rb_big_hash, 0);
rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0);
rb_define_method(rb_cBignum, "abs", rb_big_abs, 0);
rb_define_method(rb_cBignum, "magnitude", rb_big_abs, 0);