Skip to content

Commit

Permalink
test/integer: test negative integer divisions; ref #5678
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Mar 26, 2022
1 parent a91b55f commit bf5bbf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/t/integer.rb
Expand Up @@ -40,6 +40,10 @@
assert_equal 2, a
a = 5/2
assert_equal 2, a
b = -1/2
assert_equal(-1, b)
b = 1/-2
assert_equal(-1, b)
skip unless Object.const_defined?(:Float)
b = 2/1.0
assert_equal 2.0, b
Expand Down

0 comments on commit bf5bbf0

Please sign in to comment.