summaryrefslogtreecommitdiff
path: root/test/ruby/test_assignment.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-04-23 22:11:01 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-04-23 22:11:01 +0900
commit71ee05c9363935d0c6db01cb22edfdb2b128af4f (patch)
tree47c0406e9d104fdb5aa14dd4d81cdab2981231f6 /test/ruby/test_assignment.rb
parentcf7b33d5a2e64fa96f43decf603c452ccbf37654 (diff)
test/ruby/test_assignment.rb: Avoid "assigned but unused variable"
Diffstat (limited to 'test/ruby/test_assignment.rb')
-rw-r--r--test/ruby/test_assignment.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_assignment.rb b/test/ruby/test_assignment.rb
index a5d9348cbb..41e8bffe82 100644
--- a/test/ruby/test_assignment.rb
+++ b/test/ruby/test_assignment.rb
@@ -110,7 +110,7 @@ class TestAssignment < Test::Unit::TestCase
assert_equal([:x1, :y1, :x2, :x3, :x4, :r1, :r2, [:z=, :r1], [:[]=, 1, 2, 3, [6, 7]], [:[]=, 4, :r2], [:x5=, 8]], order)
order.clear
- (x1.y1.z, x2.x5), a = [r1, r2], 7
+ (x1.y1.z, x2.x5), _a = [r1, r2], 7
assert_equal([:x1, :y1, :x2, :r1, :r2, [:z=, :r1], [:x5=, :r2]], order)
order.clear
@@ -130,11 +130,11 @@ class TestAssignment < Test::Unit::TestCase
assert_equal([:x1, :y1, :x1, :x2, :x3, :x4, :r1, :r2, [:z=, :r1], [:x5=, 5], [:[]=, 1, 2, 3, [6, 7]], [:[]=, 4, :r2], [:x5=, 8]], order)
order.clear
- ((x1.y1.z, x1.x5), a), *x2[1, 2, 3], ((x3[4], x4.x5), b) = [[r1, 5], 10], 6, 7, [[r2, 8], 11]
+ ((x1.y1.z, x1.x5), _a), *x2[1, 2, 3], ((x3[4], x4.x5), _b) = [[r1, 5], 10], 6, 7, [[r2, 8], 11]
assert_equal([:x1, :y1, :x1, :x2, :x3, :x4, :r1, :r2, [:z=, :r1], [:x5=, 5], [:[]=, 1, 2, 3, [6, 7]], [:[]=, 4, :r2], [:x5=, 8]], order)
order.clear
- ((x1.y1.z, *x1.x5), a), *x2[1, 2, 3], ((*x3[4], x4.x5), b) = [[r1, 5], 10], 6, 7, [[r2, 8], 11]
+ ((x1.y1.z, *x1.x5), _a), *x2[1, 2, 3], ((*x3[4], x4.x5), _b) = [[r1, 5], 10], 6, 7, [[r2, 8], 11]
assert_equal([:x1, :y1, :x1, :x2, :x3, :x4, :r1, :r2, [:z=, :r1], [:x5=, [5]], [:[]=, 1, 2, 3, [6, 7]], [:[]=, 4, [:r2]], [:x5=, 8]], order)
order.clear
end