From b4f9b031deaf7c75dad7aa10f2318bb37e268fa3 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 22 Nov 2017 16:09:50 +0900 Subject: Some cosmetic changes --- test/t/bs_block.rb | 2 +- test/t/lang.rb | 14 +++++++------- test/t/string.rb | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/t/bs_block.rb b/test/t/bs_block.rb index 04a4a15ba..62eb7e32e 100644 --- a/test/t/bs_block.rb +++ b/test/t/bs_block.rb @@ -336,7 +336,7 @@ end assert('BS Block 28') do assert_equal(10) do - 3.times{|bl| + 3.times{ break 10 } end diff --git a/test/t/lang.rb b/test/t/lang.rb index 57c375643..c28bcfa92 100755 --- a/test/t/lang.rb +++ b/test/t/lang.rb @@ -8,7 +8,7 @@ # # For example, the following mruby code: # -# if i > 0 and i < 10 then +# if i > 0 and i < 10 # # compiles to the following byte code: # @@ -27,21 +27,21 @@ assert('and', '11.2.3') do a = 1 - if a > 0 and a < 10 then + if a > 0 and a < 10 b = 1 else b = 0 end assert_equal 1, b - if a < 0 and a < 10 then + if a < 0 and a < 10 b = 1 else b = 0 end assert_equal 0, b - if a < 0 and a > 10 then + if a < 0 and a > 10 b = 1 else b = 0 @@ -51,21 +51,21 @@ end assert('or','11.2.4') do a = 1 - if a > 0 or a < 10 then + if a > 0 or a < 10 b = 1 else b = 0 end assert_equal 1, b - if a < 0 or a < 10 then + if a < 0 or a < 10 b = 1 else b = 0 end assert_equal 1, b - if a < 0 or a > 10 then + if a < 0 or a > 10 b = 1 else b = 0 diff --git a/test/t/string.rb b/test/t/string.rb index c9041469e..6351d5d98 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -367,9 +367,9 @@ assert('String#gsub', '15.2.10.5.18') do assert_equal('aBcaBc', 'abcabc'.gsub('b', 'B'), 'gsub without block') assert_equal('aBcaBc', 'abcabc'.gsub('b'){|w| w.capitalize }, 'gsub with block') assert_equal('$a$a$', '#a#a#'.gsub('#', '$'), 'mruby/mruby#847') - assert_equal('$a$a$', '#a#a#'.gsub('#'){|w| '$' }, 'mruby/mruby#847 with block') + assert_equal('$a$a$', '#a#a#'.gsub('#'){|_w| '$' }, 'mruby/mruby#847 with block') assert_equal('$$a$$', '##a##'.gsub('##', '$$'), 'mruby/mruby#847 another case') - assert_equal('$$a$$', '##a##'.gsub('##'){|w| '$$' }, 'mruby/mruby#847 another case with block') + assert_equal('$$a$$', '##a##'.gsub('##'){|_w| '$$' }, 'mruby/mruby#847 another case with block') assert_equal('A', 'a'.gsub('a', 'A')) assert_equal('A', 'a'.gsub('a'){|w| w.capitalize }) assert_equal("<><>", 'a'.gsub('a', '<\0><\1><\2>')) -- cgit v1.2.3