diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-22 01:37:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-22 01:37:36 +0000 |
commit | f644d3ef6789672fcae8b3da2e91655ad2cd736a (patch) | |
tree | c018735e538a5d60bbed0c3b1f67701096d542ef /test | |
parent | 8bd7c8cbc88f8ca318fa9a7b3f7f1476cc1da965 (diff) | |
download | ruby-f644d3ef6789672fcae8b3da2e91655ad2cd736a.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 5b973a0901..8830dbec30 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -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 |