diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-10 07:11:45 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-10 07:11:45 +0000 |
commit | 21aef91673bb6b2a7f3025b3c79c5f097a262131 (patch) | |
tree | 92c9de90b75e8ecf9f32fd799b8c65f96e43873c /test | |
parent | 0a619ef7efdaa8001bb4a9b028e2b35174ce66bb (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_2@55355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 0c88670eb8..cc1444c924 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1005,6 +1005,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 |