summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-08 14:17:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-08 14:17:53 +0000
commit67245eec7192abdc1dd0dc2510c1f6c77df89bd0 (patch)
treefacd3ae86d8ea6fbb70c362cc9a1e22fbaf54b56 /string.c
parent1bcc5eb9223fae41acd88ecacef0aee0d2087e56 (diff)
* eval.c (rb_thread_restore_context): save current value of
lastline and lastmatch in the thread struct for later restore. * eval.c (rb_thread_save_context): restore lastline and lastmatch. * numeric.c (flo_to_s): should handle negative float value. * class.c (rb_include_module): should check whole ancestors to avoid duplicate module inclusion. * string.c (trnext): should check backslash before updating "now" position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 78126da285..00c139cb91 100644
--- a/string.c
+++ b/string.c
@@ -1967,11 +1967,11 @@ trnext(t)
for (;;) {
if (!t->gen) {
if (t->p == t->pend) return -1;
- t->now = *(USTR)t->p++;
if (t->p < t->pend - 1 && *t->p == '\\') {
t->p++;
}
- else if (t->p < t->pend - 1 && *t->p == '-') {
+ t->now = *(USTR)t->p++;
+ if (t->p < t->pend - 1 && *t->p == '-') {
t->p++;
if (t->p < t->pend) {
if (t->now > *(USTR)t->p) {