mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
io.rb: fix IO#getbyte to work with UTF-8 characters; ref #5389
This commit is contained in:
@@ -305,9 +305,9 @@ class IO
|
||||
end
|
||||
|
||||
def getbyte
|
||||
ret = getc
|
||||
return ret.getbyte 0 if ret
|
||||
ret
|
||||
readbyte
|
||||
rescue EOFError
|
||||
nil
|
||||
end
|
||||
|
||||
# 15.2.20.5.3
|
||||
|
||||
Reference in New Issue
Block a user