diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-13 16:23:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-13 16:23:17 +0000 |
commit | c3e874d73d2b7d7ebb4ee04f946d90e58939fec0 (patch) | |
tree | c7e841572c25b9a0baff135bd9232ef75f67f977 /regparse.c | |
parent | 88e264d23d88cb76eadad85c76e97deff8260493 (diff) |
merge revision(s) 37175:
* 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/branches/ruby_1_9_3@37176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r-- | regparse.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/regparse.c b/regparse.c index 2b4c0bf5bb..1369c86d41 100644 --- a/regparse.c +++ b/regparse.c @@ -4491,10 +4491,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* )"-"); - if (tok->type == TK_CHAR_TYPE) - goto next_class; /* [0-9-\s] is allowed as [0-9\-\s] */ - else - 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; |