mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regparse.c (fetch_token): warn invalid back reference
and subexp call. (\k and \g). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5e4d54a98d
commit
67e11229ec
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Oct 12 05:51:11 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* regparse.c (fetch_token): warn invalid back reference
|
||||||
|
and subexp call. (\k and \g).
|
||||||
|
|
||||||
Mon Oct 12 03:47:42 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Oct 12 03:47:42 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* marshal.c (has_encoding): added for check the regexp
|
* marshal.c (has_encoding): added for check the regexp
|
||||||
|
|
12
regparse.c
12
regparse.c
|
@ -3585,8 +3585,10 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
PUNFETCH;
|
PUNFETCH;
|
||||||
|
onig_syntax_warn(env, "invalid back reference");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3608,8 +3610,10 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||||
tok->u.call.name_end = name_end;
|
tok->u.call.name_end = name_end;
|
||||||
tok->u.call.gnum = gnum;
|
tok->u.call.gnum = gnum;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
PUNFETCH;
|
onig_syntax_warn(env, "invalid subexp call");
|
||||||
|
PUNFETCH;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue