diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-25 04:21:31 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-25 04:21:31 +0000 |
commit | 49d20050674c3205217882c2bf44883215e61d29 (patch) | |
tree | 41e8728c581d32b76e9c54cc129c8e8bbbb6f708 /test/ruby/test_regexp.rb | |
parent | eb30aacf92029f2dd6977d421b51a473475d87ae (diff) | |
download | ruby-49d20050674c3205217882c2bf44883215e61d29.tar.gz |
* regcomp.c (compile_length_tree): return error code immediately
if compile_length_tree raised error [Bug #12418]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r-- | test/ruby/test_regexp.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 34466e0262..85e78383b0 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1078,6 +1078,9 @@ class TestRegexp < Test::Unit::TestCase conds = {"xy"=>true, "yx"=>true, "xx"=>false, "yy"=>false} assert_match_each(/\A((x)|(y))(?(2)y|x)\z/, conds, bug8583) assert_match_each(/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/, conds, bug8583) + + bug12418 = '[ruby-core:75694] [Bug #12418]' + assert_raise(RegexpError, bug12418){ Regexp.new('(0?0|(?(5)||)|(?(5)||))?') } end def test_options_in_look_behind |