mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e667720bd4
commit
5c71aadbed
1 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,8 @@ class TestRegexp < Test::Unit::TestCase
|
|||
assert_equal({"foo"=>[1, 2]},
|
||||
/(?<foo>.)(?<foo>.)/.named_captures)
|
||||
assert_equal({}, /(.)(.)/.named_captures)
|
||||
|
||||
assert_equal("a[b]c", "abc".sub(/(?<x>[bc])/, "[\\k<x>]"))
|
||||
end
|
||||
|
||||
def test_assign_named_capture
|
||||
|
|
Loading…
Add table
Reference in a new issue