diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
| commit | de2363a9f0c7d368ee9002f86931d124e644a243 (patch) | |
| tree | 2112928a80786a109ecac4b3ce200f45ac75e2cb /test/t/string.rb | |
| parent | 388d26d77027feaa3e107abf7209e2681868bbe6 (diff) | |
| parent | 625f9f6fa314872968632c5adbee7fb3823268b8 (diff) | |
| download | mruby-de2363a9f0c7d368ee9002f86931d124e644a243.tar.gz mruby-de2363a9f0c7d368ee9002f86931d124e644a243.zip | |
Merge branch 'mrb_without_float' of https://github.com/pandax381/mruby into 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 |
