From 2aa3817e52492ed4e121a16eb57305acdacfda3a Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 11 Jun 2016 17:47:43 +0000 Subject: 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 --- test/ruby/test_regexp.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby') 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)|(?y))(?()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 -- cgit v1.2.3