mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (trnext): should enable backslash escape.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
373d43f61e
commit
f3fa37e8e5
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Jan 5 02:14:45 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (trnext): should enable backslash escape.
|
||||
|
||||
Sat Jan 5 01:50:32 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (Init_eval): move instance_eval and instance_exec to
|
||||
|
|
3
string.c
3
string.c
|
@ -3481,6 +3481,9 @@ trnext(struct tr *t, rb_encoding *enc)
|
|||
for (;;) {
|
||||
if (!t->gen) {
|
||||
if (t->p == t->pend) return -1;
|
||||
if (t->p < t->pend - 1 && *t->p == '\\') {
|
||||
t->p++;
|
||||
}
|
||||
t->now = rb_enc_codepoint(t->p, t->pend, enc);
|
||||
t->p += rb_enc_codelen(t->now, enc);
|
||||
if (t->p < t->pend - 1 && *t->p == '-') {
|
||||
|
|
Loading…
Add table
Reference in a new issue