From cca19532c5f71e1bdc0b4947b2fcddd181f27781 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 3 Jan 2019 11:34:35 +0900 Subject: Remove `Kernel#class_defined?` which is not available in CRuby; #3829 --- test/t/array.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/t/array.rb') diff --git a/test/t/array.rb b/test/t/array.rb index 53fbdcf1a..c182d5e14 100644 --- a/test/t/array.rb +++ b/test/t/array.rb @@ -55,9 +55,10 @@ assert('Array#[]', '15.2.12.5.4') do assert_equal(nil, [1,2,3].[](-4)) a = [ "a", "b", "c", "d", "e" ] - assert_equal("b", a[1.1]) if class_defined?("Float") assert_equal(["b", "c"], a[1,2]) assert_equal(["b", "c", "d"], a[1..-2]) + skip unless Object.const_defined?(:Float) + assert_equal("b", a[1.1]) end assert('Array#[]=', '15.2.12.5.5') do -- cgit v1.2.3