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 07ccf897c7..4ff50a776d 100644
--- a/string.c
+++ b/string.c
@@ -3475,7 +3475,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
}
else if (rb_enc_mbmaxlen(enc) == 1) {
while (s < send) {
- c = *s;
+ c = (unsigned char)*s;
if (trans[c] >= 0) {
if (!cflag) {
c = FIX2INT(trans[c]);