summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-09 10:51:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-09 10:51:11 +0000
commita184ef4408533de8e845f9635abefe94ccca0085 (patch)
tree2c87a7b1c3fecb59dbc6db6cdd90f07795535a47 /io.c
parent4f5435dac41652ffa0130a20c0cc3fdb1414f3b1 (diff)
downloadruby-a184ef4408533de8e845f9635abefe94ccca0085.tar.gz
ruby-a184ef4408533de8e845f9635abefe94ccca0085.tar.xz
ruby-a184ef4408533de8e845f9635abefe94ccca0085.zip
* io.c (rb_io_getline): should not treat char as negative value.
[ruby-dev:24460] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 52e71f3df..98e3329ba 100644
--- a/io.c
+++ b/io.c
@@ -1405,7 +1405,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;