ruby-changes:44199
From: nobu <ko1@a...>
Date: Tue, 27 Sep 2016 23:19:38 +0900 (JST)
Subject: [ruby-changes:44199] nobu:r56272 (trunk): test_syntax.rb: more test_warn_balanced
nobu 2016-09-27 23:19:32 +0900 (Tue, 27 Sep 2016) New Revision: 56272 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56272 Log: test_syntax.rb: more test_warn_balanced * test/ruby/test_syntax.rb (test_warn_balanced): more assertions for a symbol literal and a local variable. Modified files: trunk/test/ruby/test_syntax.rb Index: test/ruby/test_syntax.rb =================================================================== --- test/ruby/test_syntax.rb (revision 56271) +++ test/ruby/test_syntax.rb (revision 56272) @@ -311,8 +311,14 @@ WARN https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L311 [:/, "regexp literal"], [:%, "string literal"], ].each do |op, syn| - assert_warning(warning % [op, syn]) do - assert_valid_syntax("puts 1 #{op}0", "test", verbose: true) + all_assertions do |a| + ["puts 1 #{op}0", "puts :a #{op}0", "m = 1; puts m #{op}0"].each do |src| + a.for(src) do + assert_warning(warning % [op, syn], src) do + assert_valid_syntax(src, "test", verbose: true) + end + end + end end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/