summaryrefslogtreecommitdiffstats
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 33d03e13c..a47485680 100644
--- a/string.c
+++ b/string.c
@@ -5862,7 +5862,7 @@ rb_str_rstrip_bang(VALUE str)
if (single_byte_optimizable(str)) {
/* remove trailing spaces or '\0's */
- while (s < t && (t[-1] == '\0' || rb_enc_isspace(*(t-1), enc))) t--;
+ while (s < t && (*(t-1) == '\0' || rb_enc_isspace(*(t-1), enc))) t--;
}
else {
char *tp;