summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-01-13 21:15:13 +0900
committerNobuyoshi Nakada <[email protected]>2021-01-13 21:16:00 +0900
commit0036648a420f945624898568bb82bc5f83195d12 ()
tree1ddad9a8be124fb58f74b614caddd20564a1b584 /test/ruby
parente9b93d67baf8a6add548b7e5c702665100e4b3c9 (diff)
Capture to reserved name variables if already defined [Bug #17533]
Notes: Merged: https://.com/ruby/ruby/pull/4059
-rw-r--r--test/ruby/test_regexp.rb11
1 files changed, 11 insertions, 0 deletions
@@ -229,6 +229,17 @@ class TestRegexp < Test::Unit::TestCase
def test_assign_named_capture_to_reserved_word
/(?<nil>.)/ =~ "a"
assert_not_include(local_variables, :nil, "[ruby-dev:32675]")
end
def test_assign_named_capture_to_const