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/string.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/t/string.rb') diff --git a/test/t/string.rb b/test/t/string.rb index 3a1eced16..8f008c6a7 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -155,7 +155,7 @@ assert('String#[]=') do d[-10] = 'X' end - if class_defined?("Float") + if Object.const_defined?(:Float) e = 'abc' e[1.1] = 'X' assert_equal 'aXc', e @@ -618,7 +618,7 @@ assert('String#to_f', '15.2.10.5.38') do assert_float(12345.6789, c) assert_float(0, d) assert_float(Float::INFINITY, e) -end if class_defined?("Float") +end if Object.const_defined?(:Float) assert('String#to_i', '15.2.10.5.39') do a = ''.to_i -- cgit v1.2.3