diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-13 14:23:40 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-13 14:23:40 +0000 |
commit | be3a6b8c403f94715205bcb7ee60515f65c6d482 (patch) | |
tree | 6f238432a8aa24577c67a2deb7c58889b71ebd52 /regparse.c | |
parent | 872a47c1bf2ebdc1e517a6b429bbe065860b5206 (diff) | |
download | ruby-be3a6b8c403f94715205bcb7ee60515f65c6d482.tar.gz |
* regparse.c (parse_char_class): should match with a hyphen after a
range in a character class.
* test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
test.
* test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
error message.
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
because the previous name was wrong.
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
more test pattern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r-- | regparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regparse.c b/regparse.c index 460cba7a23..70713f6a14 100644 --- a/regparse.c +++ b/regparse.c @@ -4706,7 +4706,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end, if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) { CC_ESC_WARN(env, (UChar* )"-"); - goto sb_char; /* [0-9-a] is allowed as [0-9\-a] */ + goto range_end_val; /* [0-9-a] is allowed as [0-9\-a] */ } r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS; goto err; |