Fix assertion name for `Numeric#**` test
@@ -19,14 +19,6 @@ assert('Numeric#abs', '15.2.7.4.3') do
assert_equal(1.0, -1.abs)
end
-assert('Numeric#pow') do
- assert_equal(8, 2 ** 3)
- assert_equal(-8, -2 ** 3)
- assert_equal(1, 2 ** 0)
- assert_equal(1, 2.2 ** 0)
- assert_equal(0.5, 2 ** -1)
-end
-
assert('Numeric#/', '15.2.8.3.4') do
n = Class.new(Numeric){ def /(x); 15.1;end }.new
@@ -40,7 +32,13 @@ end
# Not ISO specified
assert('Numeric#**') do
- assert_equal 8.0, 2.0**3
+ assert_equal(8, 2 ** 3)
+ assert_equal(-8, -2 ** 3)
+ assert_equal(1, 2 ** 0)
+ skip unless Object.const_defined?(:Float)
+ assert_equal(1.0, 2.2 ** 0)
+ assert_equal(0.5, 2 ** -1)
+ assert_equal(8.0, 2.0**3)
end
assert('Numeric#step') do
