mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 07:26:00 +02:00
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:
parent
8bd7c8cbc8
commit
f644d3ef67
2 changed files with 35 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue