summaryrefslogtreecommitdiff
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 49eddf6148..8046145178 100644
--- a/string.c
+++ b/string.c
@@ -1568,7 +1568,7 @@ rb_str_upto(VALUE beg, VALUE end, int excl)
StringValue(current);
if (excl && rb_str_equal(current, end)) break;
StringValue(current);
- if (RSTRING_LEN(current) > RSTRING_LEN(end) || RSTRING(current)->len == 0)
+ if (RSTRING_LEN(current) > RSTRING_LEN(end) || RSTRING_LEN(current) == 0)
break;
}