summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 07:48:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 07:48:02 +0000
commit41f4317f45021460871bd11c666f438f5517904b (patch)
treec7ac02b58faafe7f92946fe8f14c18480280624f /test/ruby/test_syntax.rb
parent311b7154839b91c87ee40908ac6d3f5c330d7b11 (diff)
test/ruby: suppress parser warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 11b3f27582..e2c524b8b1 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -205,7 +205,7 @@ class TestSyntax < Test::Unit::TestCase
def test_keyword_invalid_name
bug11663 = '[ruby-core:71356] [Bug #11663]'
- o = Object.new
+ o = o = Object.new
assert_syntax_error('def o.foo(arg1?:) end', /arg1\?/, bug11663)
assert_syntax_error('def o.foo(arg1?:, arg2:) end', /arg1\?/, bug11663)
assert_syntax_error('proc {|arg1?:|}', /arg1\?/, bug11663)
@@ -362,7 +362,7 @@ WARN
def test_cmdarg_kwarg_lvar_clashing_method
bug12073 = '[ruby-core:73816] [Bug#12073]'
- a = 1
+ a = a = 1
assert_valid_syntax("a b: 1")
assert_valid_syntax("a = 1; a b: 1", bug12073)
end
@@ -442,7 +442,7 @@ WARN
}
}
assert_warning(/#{w}/){#/3: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){
- a = 1
+ a = a = 1
eval %q{
case 1
when 1, 1
@@ -590,7 +590,7 @@ e"
end
def test_dedented_heredoc_with_interpolated_string
- w = ""
+ w = w = ""
result = " \#{mesg} a\n" \
" zy\n"
expect = '#{mesg} a'"\n" \