diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-25 05:29:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-25 05:29:35 +0000 |
commit | 7db534a20c78cf4b9d8eb5f3c6a0198c2dd65aad (patch) | |
tree | 6b52b2e04eb5961d29f362359e9b774fe1245afb /numeric.c | |
parent | b827fdffe60d612762dd8628e3dea9b6548a4f1c (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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |