diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 06:14:46 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 06:14:46 +0000 |
| commit | 9f9388e57ea204d15f9ae073f043dc646739d0e7 (patch) | |
| tree | e43aa9471d4b50e845ac2521648e11e2b851a446 /test/ruby | |
| parent | 3a2319f3e0eebe9e2024a52c095ae7201c7520e7 (diff) | |
* regexp.c (re_compile_pattern): allow zero times match for
non-greedy range repeatation. [ruby-core:30613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_regexp.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 3f05d6a08a..e89c9e2081 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -467,4 +467,9 @@ class TestRegexp < Test::Unit::TestCase assert_equal("1", $1) assert_equal(" " * 4999999, $2) end + + def test_range_greedy + /wo{0,3}?/ =~ "woo" + assert_equal("w", $&) + end end |
