diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-15 04:20:46 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-15 04:20:46 +0000 |
commit | 625e48e720d72a7959815a78d6a4d3ce89d8d56d (patch) | |
tree | 67826d260d299bc16de16604fc7e48b85e353638 /rational.c | |
parent | 1288dc298ea81bc2a775950ad6d198575b1891a5 (diff) | |
download | ruby-625e48e720d72a7959815a78d6a4d3ce89d8d56d.tar.gz ruby-625e48e720d72a7959815a78d6a4d3ce89d8d56d.tar.xz ruby-625e48e720d72a7959815a78d6a4d3ce89d8d56d.zip |
* complex.c (nucomp_eql_p): new.
* complex.c (nucomp_hash): should use hash values of the elements.
* rational.c (nurat_hash): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rational.c b/rational.c index c4411d442..6cc75c8d7 100644 --- a/rational.c +++ b/rational.c @@ -27,8 +27,8 @@ VALUE rb_cRational; static ID id_Unify, id_abs, id_cmp, id_convert, id_equal_p, id_expt, - id_floor, id_format, id_idiv, id_inspect, id_integer_p, id_negate, - id_new, id_new_bang, id_to_f, id_to_i, id_to_s, id_truncate; + id_floor, id_format, id_hash, id_idiv, id_inspect, id_integer_p, + id_negate, id_new, id_new_bang, id_to_f, id_to_i, id_to_s, id_truncate; #define f_boolcast(x) ((x) ? Qtrue : Qfalse) @@ -139,6 +139,7 @@ binop(xor, '^') fun1(abs) fun1(floor) +fun1(hash) fun1(inspect) fun1(integer_p) fun1(negate) @@ -1486,6 +1487,7 @@ Init_Rational(void) id_expt = rb_intern("**"); id_floor = rb_intern("floor"); id_format = rb_intern("format"); + id_hash = rb_intern("hash"); id_idiv = rb_intern("div"); id_inspect = rb_intern("inspect"); id_integer_p = rb_intern("integer?"); |