ruby-changes:3394
From: ko1@a...
Date: 5 Jan 2008 02:15:38 +0900
Subject: [ruby-changes:3394] matz - Ruby:r14887 (trunk): * string.c (trnext): should enable backslash escape.
matz 2008-01-05 02:15:22 +0900 (Sat, 05 Jan 2008) New Revision: 14887 Modified files: trunk/ChangeLog trunk/string.c Log: * string.c (trnext): should enable backslash escape. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=14887&r2=14886&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14887&r2=14886&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 14886) +++ ChangeLog (revision 14887) @@ -1,3 +1,7 @@ +Sat Jan 5 02:14:45 2008 Yukihiro Matsumoto <matz@r...> + + * string.c (trnext): should enable backslash escape. + Sat Jan 5 01:50:32 2008 Yukihiro Matsumoto <matz@r...> * eval.c (Init_eval): move instance_eval and instance_exec to Index: string.c =================================================================== --- string.c (revision 14886) +++ string.c (revision 14887) @@ -3481,6 +3481,9 @@ 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 == '-') { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml