aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_assignment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_assignment.rb')
-rw-r--r--test/ruby/test_assignment.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_assignment.rb b/test/ruby/test_assignment.rb
index 41c14d3a44..45c4d6e058 100644
--- a/test/ruby/test_assignment.rb
+++ b/test/ruby/test_assignment.rb
@@ -771,4 +771,14 @@ class TestAssignmentGen < Test::Unit::TestCase
h[*k], = ["ok", "ng"]
assert_equal("ok", h[:key], bug11970)
end
+
+ def test_chainged_assign_command
+ all_assertions do |a|
+ asgn = %w'= +='
+ asgn.product(asgn) do |a1, a2|
+ stmt = "a #{a1} b #{a2} raise 'x'"
+ a.for(stmt) {assert_valid_syntax(stmt)}
+ end
+ end
+ end
end