summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-19 17:35:40 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-19 17:35:40 +0000
commit68c4c9d24c30e84bab7595001996457a2b40837a (patch)
tree5d016cb0ca54fa35fdebe5d43f9ee345c1fe1822 /test/ruby
parent1049e08aa7f2728f97823b868f2eb5071ca4c56b (diff)
merge revision(s) 55163,55165: [Backport #12420]
* regparse.c (fetch_token_in_cc): raise error if given octal escaped character is too big. [Bug #12420] [Bug #12423] * re.c (unescape_nonascii): scan hex up to only 3 characters. [Bug #12420] [Bug #12423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_regexp.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index db6e8a3b81..dce5792954 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -389,6 +389,8 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(arg_encoding_none, Regexp.new("", nil, "N").options)
assert_raise(RegexpError) { Regexp.new(")(") }
+ assert_raise(RegexpError) { Regexp.new('[\\40000000000') }
+ assert_raise(RegexpError) { Regexp.new('[\\600000000000.') }
end
def test_unescape