summaryrefslogtreecommitdiffhomepage
path: root/test/t
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-11-22 16:09:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-11-22 16:09:50 +0900
commitb4f9b031deaf7c75dad7aa10f2318bb37e268fa3 (patch)
tree6e38cc9b61330d34d09e157bca406dc1b084198c /test/t
parent284a1d12ee6b0fdd77b042771f5db833112fc14e (diff)
downloadmruby-b4f9b031deaf7c75dad7aa10f2318bb37e268fa3.tar.gz
mruby-b4f9b031deaf7c75dad7aa10f2318bb37e268fa3.zip
Some cosmetic changes
Diffstat (limited to 'test/t')
-rw-r--r--test/t/bs_block.rb2
-rwxr-xr-xtest/t/lang.rb14
-rw-r--r--test/t/string.rb4
3 files changed, 10 insertions, 10 deletions
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><><>", 'a'.gsub('a', '<\0><\1><\2>'))