diff --git a/lib/modules/Stdio.pmod b/lib/modules/Stdio.pmod
index d64f8831db337ebdf332d1da5e1d86996a7dc74d..7efb3f95911cf25938ac7c1fb57ca2dab7938200 100644
--- a/lib/modules/Stdio.pmod
+++ b/lib/modules/Stdio.pmod
@@ -96,6 +96,13 @@ class FILE {
       return o;
     }
 
+    int assign(object foo)
+    {
+      bpos=0;
+      b="";
+      return ::assign(foo);
+    }
+
     void set_nonblocking()
     {
       error("Cannot use nonblocking IO with buffered files.\n");