summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-27 08:18:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-27 08:18:38 +0000
commitc6b9f162317bcd287a8983f67049d0cb9ba1566f (patch)
treee17bcb6b3e70f03c9b2d7b0e47104e89ff16fe22 /string.c
parent563742204dcf1d8348a5dd51fd5e43ff50669f55 (diff)
* string.c (scan_once): wrong condition to use mbclen2().
[ruby-dev:27535] * time.c (time_sunday): added predicate methods for the days of the week. [ruby-list:41340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index bce4ea78c7..61baa930cf 100644
--- a/string.c
+++ b/string.c
@@ -3993,7 +3993,7 @@ scan_once(VALUE str, VALUE pat, long *start)
/*
* Always consume at least one character of the input string
*/
- if (RSTRING(str)->len < END(0))
+ if (RSTRING(str)->len > END(0))
*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
else
*start = END(0)+1;