diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_assignment.rb | 10 |
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 |