summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-03-22 14:38:23 +0900
committerGitHub <[email protected]>2019-03-22 14:38:23 +0900
commit19191a547604045b7b173e224f8da8265ca2f407 (patch)
treee3c00fa3cd9ccc46db2408c8f22b1ed971d3b5eb /test
parent3f7cd4687fc7ec46d8a8dd6c9c2505205cbd32a8 (diff)
parenta41b02ab918d7fb976234e1b07e2e60eff4d9f96 (diff)
downloadmruby-19191a547604045b7b173e224f8da8265ca2f407.tar.gz
mruby-19191a547604045b7b173e224f8da8265ca2f407.zip
Merge pull request #4335 from shuujii/fix-Float-eql
Fix `Float#eql?`
Diffstat (limited to 'test')
-rw-r--r--test/t/float.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/t/float.rb b/test/t/float.rb
index c137698d3..910d7b1d5 100644
--- a/test/t/float.rb
+++ b/test/t/float.rb
@@ -239,4 +239,10 @@ assert('Float#to_s') do
end
end
+assert('Float#eql?') do
+ assert_true(5.0.eql?(5.0))
+ assert_false(5.0.eql?(5))
+ assert_false(5.0.eql?("5.0"))
+end
+
end # const_defined?(:Float)