summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorxtkoba (Tee KOBAYASHI) <[email protected]>2021-03-15 10:15:10 +0900
committerNobuyoshi Nakada <[email protected]>2021-03-15 10:17:50 +0900
commit0846c2da457e7523819236ac7da492029b3ef73d ()
tree8d424984e1358e5812161be9c51cc16e32dc71de /test/ruby/test_regexp.rb
parent2a6bfd22468343003463e0cbf91953a01b0dbba5 (diff)
Check backref number buffer overrun [Bug #16376]
-rw-r--r--test/ruby/test_regexp.rb6
1 files changed, 6 insertions, 0 deletions
@@ -1312,6 +1312,12 @@ class TestRegexp < Test::Unit::TestCase
assert_nil($1)
end
# This assertion is for porting x2() tests in testpy.py of Onigmo.
def assert_match_at(re, str, positions, msg = nil)
re = Regexp.new(re) unless re.is_a?(Regexp)