summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordearblue <[email protected]>2019-09-15 22:51:22 +0900
committerdearblue <[email protected]>2019-09-16 00:11:43 +0900
commit52a0ad4108d7b5f025c7f3def04649ea4fb56c1d (patch)
treea283a01b05788fe14bd2b84d1e62706451eba2c3
parent77368ce762b7a0e332580cd091fbe063ad2702c1 (diff)
downloadmruby-52a0ad4108d7b5f025c7f3def04649ea4fb56c1d.tar.gz
mruby-52a0ad4108d7b5f025c7f3def04649ea4fb56c1d.zip
Fix `IO#pos`
-rw-r--r--mrbgems/mruby-io/mrblib/io.rb2
1 files changed, 1 insertions, 1 deletions
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