summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-06 07:47:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-06 07:47:47 +0000
commitf29380628f569131bd7e917b6b9eb05734ffb81e (patch)
tree89cbb92857f1c9d3f35eadd421cbdc1bba146610 /string.c
parent20af3b306654bddff93a14216eae58c72f969b4e (diff)
* 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/branches/ruby_1_6@1737 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 da00bb4bf3..bb0201c1c3 100644
--- a/string.c
+++ b/string.c
@@ -1793,11 +1793,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) {