aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
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;