diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-01 09:12:09 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-01 09:12:09 +0000 |
| commit | a830576fb53c458e8456f73f1527a7e16d9c9062 (patch) | |
| tree | 6b107c921a11fe5d323cf3b06ad4b1e00e264ef5 /test/ruby/test_regexp.rb | |
| parent | 46384f2ab72e918142cbac851a866f4c11cfb0fc (diff) | |
| download | ruby-a830576fb53c458e8456f73f1527a7e16d9c9062.tar.gz ruby-a830576fb53c458e8456f73f1527a7e16d9c9062.tar.xz ruby-a830576fb53c458e8456f73f1527a7e16d9c9062.zip | |
add tests for [ruby-dev:34556] and [ruby-dev:34555].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
| -rw-r--r-- | test/ruby/test_regexp.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 17fe9fa45..45ca22052 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -250,6 +250,10 @@ class TestRegexp < Test::Unit::TestCase assert_equal(["foo", "bar", "baz"], m.values_at(1, 2, 3)) end + def test_match_select + assert_equal(["ab", "a", "b"], /(.)(.)/.match("ab").select {|v| true }, "[ruby-dev:34556]") + end + def test_match_string m = /(?<x>b..)/.match("foobarbaz") assert_equal("foobarbaz", m.string) |
