1
0
Fork 0
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:
akr 2007-12-21 07:08:52 +00:00
parent e667720bd4
commit 5c71aadbed

View file

@ -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