Moved tests for Integer#quo

The `Rational` class is never defined during core testing.
This commit is contained in:
dearblue
2025-01-26 21:11:21 +09:00
parent 171847a99a
commit 12e90896a5
2 changed files with 6 additions and 6 deletions
+5
View File
@@ -309,3 +309,8 @@ assert 'Rational#**' do
assert_float(16.0, (4r)**(2.0))
assert_float(3.5**1.5, (7/2r)**(1.5))
end
assert 'Integer#quo' do
a = 6.quo(5)
assert_equal 6/5r, a
end
+1 -6
View File
@@ -49,12 +49,7 @@ assert('Integer#/', '15.2.8.3.4') do
assert_equal 2.0, b
end
if Object.const_defined?(:Rational)
assert('Integer#quo') do
a = 6.quo(5)
assert_equal 5/6r, a
end
elsif Object.const_defined?(:Float)
if Object.const_defined?(:Float)
assert('Integer#quo') do
a = 6.quo(5)
assert_equal 1.2, a