From 52a0ad4108d7b5f025c7f3def04649ea4fb56c1d Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 15 Sep 2019 22:51:22 +0900 Subject: Fix `IO#pos` --- mrbgems/mruby-io/mrblib/io.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-io/mrblib/io.rb b/mrbgems/mruby-io/mrblib/io.rb index 3f5216fcb..eea6e923a 100644 --- a/mrbgems/mruby-io/mrblib/io.rb +++ b/mrbgems/mruby-io/mrblib/io.rb @@ -150,7 +150,7 @@ class IO def pos raise IOError if closed? - sysseek(0, SEEK_CUR) - @buf.length + sysseek(0, SEEK_CUR) - @buf.bytesize end alias_method :tell, :pos -- cgit v1.2.3