parse.y: workaround for warnings

* parse.y (mark_lvar_used): enable workaround to suppress unused
  local variables.  [ruby-core:82656] [Bug #13872]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-10-22 01:37:36 +00:00
parent 8bd7c8cbc8
commit f644d3ef67
2 changed files with 35 additions and 0 deletions

View file

@ -890,6 +890,7 @@ x = __ENCODING__
assert_warning(/#{a}/) {o.instance_eval("def foo; #{a}=1; nil; end")}
o = Object.new
assert_warning(/assigned but unused variable/) {o.instance_eval("def foo; tap {a=1; a()}; end")}
assert_warning('') {o.instance_eval("def bar; a=a=1; nil; end")}
end
def test_named_capture_conflict