summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-07 05:57:43 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-07 05:57:43 +0000
commit81234c5ecaab58e03e346ebdbf5678e4b8a3db55 (patch)
tree3e291a26fec6b193bb7cca54e312e6d6d4801aaf /numeric.c
parente432492b4062931f656624f7904b73f89dfa4790 (diff)
parent4c5f4258aac15c8162e8e9c08ad45781511c3d48 (diff)
add tag v2_4_0_preview3v2_4_0_preview3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_4_0_preview3@56661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/numeric.c b/numeric.c
index 3620f1f3b8..6ab3593cfc 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1421,12 +1421,7 @@ flo_hash(VALUE num)
VALUE
rb_dbl_hash(double d)
{
- st_index_t hash;
-
- /* normalize -0.0 to 0.0 */
- if (d == 0.0) d = 0.0;
- hash = rb_memhash(&d, sizeof(d));
- return ST2FIX(hash);
+ return LONG2FIX(rb_dbl_long_hash (d));
}
VALUE