diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-04 17:15:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-04 17:15:22 +0000 |
commit | f3fa37e8e5743913e377ebd489cc9862f77770da (patch) | |
tree | 8cb7050ec02b27b6765c7fe3ffdd63e834307664 /string.c | |
parent | 373d43f61e0a51938a578f2f20372427ce0f08a4 (diff) | |
download | ruby-f3fa37e8e5743913e377ebd489cc9862f77770da.tar.gz |
* string.c (trnext): should enable backslash escape.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 == '-') { |