From f644d3ef6789672fcae8b3da2e91655ad2cd736a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 22 Oct 2017 01:37:36 +0000 Subject: 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 --- test/ruby/test_parse.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') 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 -- cgit v1.2.3