diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-22 14:38:23 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-03-22 14:38:23 +0900 |
| commit | 19191a547604045b7b173e224f8da8265ca2f407 (patch) | |
| tree | e3c00fa3cd9ccc46db2408c8f22b1ed971d3b5eb /src | |
| parent | 3f7cd4687fc7ec46d8a8dd6c9c2505205cbd32a8 (diff) | |
| parent | a41b02ab918d7fb976234e1b07e2e60eff4d9f96 (diff) | |
| download | mruby-19191a547604045b7b173e224f8da8265ca2f407.tar.gz mruby-19191a547604045b7b173e224f8da8265ca2f407.zip | |
Merge pull request #4335 from shuujii/fix-Float-eql
Fix `Float#eql?`
Diffstat (limited to 'src')
| -rw-r--r-- | src/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c index fa9daf8a7..4128ea3a6 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -369,7 +369,7 @@ flo_eql(mrb_state *mrb, mrb_value x) mrb_get_args(mrb, "o", &y); if (!mrb_float_p(y)) return mrb_false_value(); - return mrb_bool_value(mrb_float(x) == (mrb_float)mrb_fixnum(y)); + return mrb_bool_value(mrb_float(x) == mrb_float(y)); } /* 15.2.9.3.7 */ |
