diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-11 17:47:43 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-11 17:47:43 +0000 |
commit | 2aa3817e52492ed4e121a16eb57305acdacfda3a (patch) | |
tree | 3ac74f339d450b7efadf59c79db3ac53d6c31c20 /test/ruby/test_regexp.rb | |
parent | e206da0ab874eb76c2f4c6fc2f7874d05d518aed (diff) |
merge revision(s) 55154: [Backport #12418]
* 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/branches/ruby_2_3@55384 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 96b0bfacb1..db6e8a3b81 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1003,6 +1003,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 |