summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--re.c2
-rw-r--r--test/ruby/test_regexp.rb10
2 files changed, 12 insertions, 0 deletions
@@ -3853,6 +3853,8 @@ reg_copy(VALUE copy, VALUE orig)
RB_OBJ_WRITE(copy, &RREGEXP(copy)->src, RREGEXP(orig)->src);
RREGEXP_PTR(copy)->timelimit = RREGEXP_PTR(orig)->timelimit;
rb_enc_copy(copy, orig);
return copy;
}
@@ -1936,6 +1936,16 @@ class TestRegexp < Test::Unit::TestCase
assert_equal("123456789".match(/(?:x?\dx?){2,}/)[0], "123456789")
end
def test_bug_19537 # [Bug #19537]
str = 'aac'
re = '^([ab]{1,3})(a?)*$'