From be3a6b8c403f94715205bcb7ee60515f65c6d482 Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 13 Oct 2012 14:23:40 +0000 Subject: * 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 --- regparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regparse.c') 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; -- cgit v1.2.3