diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 12:33:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 12:33:07 +0900 |
| commit | d6cb4f9cf2027eb20f67238aa6c051448602e7e6 (patch) | |
| tree | c025d53534298097aadc3d7699de964bd8a7225f /test/t/string.rb | |
| parent | 388d26d77027feaa3e107abf7209e2681868bbe6 (diff) | |
| parent | a751f7f196e35cf85ac6f5c0d855edeb68b2bf53 (diff) | |
| download | mruby-d6cb4f9cf2027eb20f67238aa6c051448602e7e6.tar.gz mruby-d6cb4f9cf2027eb20f67238aa6c051448602e7e6.zip | |
Merge branch 'pandax381-mrb_without_float'
Diffstat (limited to 'test/t/string.rb')
| -rw-r--r-- | test/t/string.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index a4139622a..c9041469e 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -154,10 +154,11 @@ assert('String#[]=') do d[-10] = 'X' end - e = 'abc' - e[1.1] = 'X' - assert_equal 'aXc', e - + if class_defined?("Float") + e = 'abc' + e[1.1] = 'X' + assert_equal 'aXc', e + end # length of args is 2 a1 = 'abc' @@ -629,7 +630,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 +end if class_defined?("Float") assert('String#to_i', '15.2.10.5.39') do a = ''.to_i |
