summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-25 05:29:35 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-25 05:29:35 (GMT)
commit7db534a20c78cf4b9d8eb5f3c6a0198c2dd65aad (patch)
tree6b52b2e04eb5961d29f362359e9b774fe1245afb /numeric.c
parentb827fdffe60d612762dd8628e3dea9b6548a4f1c (diff)
vm_insnhelper.c: rb_eql_opt should call eql?
* vm_insnhelper.c (rb_eql_opt): should call #eql? on Float and String, not #==. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 69bb573..8205829 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1643,8 +1643,8 @@ flo_le(VALUE x, VALUE y)
* so an implementation-dependent value is returned.
*/
-static VALUE
-flo_eql(VALUE x, VALUE y)
+VALUE
+rb_float_eql(VALUE x, VALUE y)
{
if (RB_TYPE_P(y, T_FLOAT)) {
double a = RFLOAT_VALUE(x);
@@ -1658,6 +1658,8 @@ flo_eql(VALUE x, VALUE y)
return Qfalse;
}
+#define flo_eql rb_float_eql
+
/*
* call-seq:
* float.to_f -> self