summaryrefslogtreecommitdiff
path: root/test/ruby/test_call.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_call.rb')
-rw-r--r--test/ruby/test_call.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb
index d5fe9ce320..a52b75c267 100644
--- a/test/ruby/test_call.rb
+++ b/test/ruby/test_call.rb
@@ -133,6 +133,9 @@ class TestCall < Test::Unit::TestCase
kw = {}
b = lambda{}
+ # Prevent "assigned but unused variable" warnings
+ _ = [h, a, kw, b]
+
message = /keyword arg given in index/
# +=, without block, non-popped
@@ -294,6 +297,9 @@ class TestCall < Test::Unit::TestCase
a = []
kw = {}
+ # Prevent "assigned but unused variable" warnings
+ _ = [h, a, kw]
+
assert_syntax_error(%q{h[*a, 2, b: 5, **kw] += 1}, message)
end