From 7db534a20c78cf4b9d8eb5f3c6a0198c2dd65aad Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 25 May 2017 05:29:35 +0000 Subject: 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 --- numeric.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index 69bb573cc7..8205829f8d 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 -- cgit v1.2.3