summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 186fabfd0f..ad96350191 100644
--- a/io.c
+++ b/io.c
@@ -1278,7 +1278,7 @@ rb_io_getline(rs, fptr)
swallow(fptr, '\n');
}
else if (rslen == 1) {
- return rb_io_getline_fast(fptr, RSTRING(rs)->ptr[0]);
+ return rb_io_getline_fast(fptr, (unsigned char)RSTRING(rs)->ptr[0]);
}
else {
rsptr = RSTRING(rs)->ptr;