aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 09:34:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 11:45:37 +0900
commit409b0ec4c3c4878c0ba164d1303de67787157808 (patch)
tree292c5554ee9f81571b760d359ac9513c44da3ee0 /test/ruby/test_parse.rb
parent84837e6d16cb0e588b1acc2691cb1048b9a89989 (diff)
downloadruby-409b0ec4c3c4878c0ba164d1303de67787157808.tar.gz
Suppress unused variable warnings
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index b63f170981..287c8358a0 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -481,6 +481,7 @@ class TestParse < Test::Unit::TestCase
t[42, &blk] ||= t.dummy 42 # command_asgn test
END
assert_equal([:aref, :aset], a)
+ blk
end
def test_backquote
@@ -1148,7 +1149,7 @@ x = __ENCODING__
end
o.instance_eval {i (-1.3).abs}
assert_equal(1.3, o.x)
- o.instance_eval {i = 0; i (-1.3).abs}
+ o.instance_eval {i = 0; i (-1.3).abs; i}
assert_equal(1.3, o.x)
end
@@ -1157,6 +1158,7 @@ x = __ENCODING__
$VERBOSE = true
x = 1
eval("if false; 0 < x < 2; end")
+ x
end
end