summaryrefslogtreecommitdiffhomepage
path: root/mrblib/io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/io.rb')
-rw-r--r--mrblib/io.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/mrblib/io.rb b/mrblib/io.rb
index 30eb47404..4d2fda5f3 100644
--- a/mrblib/io.rb
+++ b/mrblib/io.rb
@@ -141,6 +141,10 @@ class IO
seek(i, SEEK_SET)
end
+ def rewind
+ seek(0, SEEK_SET)
+ end
+
def seek(i, whence = SEEK_SET)
raise IOError if closed?
@pos = sysseek(i, whence)