io.rb: add `IO#readbyte`; ref
MODIFY
mrbgems/mruby-io/README.md
mrbgems/mruby-io/README.md
@@ -77,7 +77,7 @@ Add the line below to your build configuration.
| IO#puts | o | |
| IO#read | o | |
| IO#read_nonblock | | |
-| IO#readbyte | | |
+| IO#readbyte | o | |
| IO#readchar | o | |
| IO#readline | o | |
| IO#readlines | o | |

MODIFY
mrbgems/mruby-io/mrblib/io.rb
mrbgems/mruby-io/mrblib/io.rb
@@ -299,6 +299,11 @@ class IO
end
end
+ def readbyte
+ _read_buf
+ IO._bufread(@buf, 1).getbyte(0)
+ end
+
def getbyte
ret = getc
return ret.getbyte 0 if ret

io.rb: add `IO#readbyte`; ref #5389