summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 03:08:10 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 03:08:10 +0000
commitb171d9204637e3790fce7bfb32fe9a54014d8301 (patch)
tree51e6ad07ad00e4aac1f1e2976b37d7585c07fecb /test/ruby/test_parse.rb
parent7f69d4e41f1cd77e142b786596dd005891a233f3 (diff)
Revert "parse.y: remove "shadowing outer local variable" warning"
I forgot to add the copyright of the patch... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index c7aeeecb61..6160aa1452 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -911,8 +911,10 @@ x = __ENCODING__
assert_equal(expected, actual, bug5614)
end
- def test_no_shadowing_variable_warning
- assert_no_warning(/shadowing outer local variable/) {eval("a=1; tap {|a|}")}
+ def test_shadowing_variable
+ assert_warning(/shadowing outer local variable/) {eval("a=1; tap {|a|}")}
+ a = "\u{3042}"
+ assert_warning(/#{a}/o) {eval("#{a}=1; tap {|#{a}|}")}
end
def test_unused_variable