e$B$3$s$K$A$Oe(B sheepman e$B$G$9!#e(B
e$B%j%U%!%l%s%9$r=q$$$F$$$F5$$,$D$$$?:Y$+$$OC$G$9$,!#e(B
StringIO#seek e$B$,Ej$2$kNc30$r!"e(BIO
e$B%/%i%9$N$=$l$K9g$o$;$k%Q%C%A$G$9!#e(B
- e$B<+?H$,e(B close e$B$5$l$F$$$?$i!"e(BIOError
e$B$rEj$2$k$h$&$K$7$^$7$?!#e(B - whence e$B$NCM$,@5$7$/$J$$>l9g$O!"e(BErrno::EINVAL
e$B$rEj$2$k$h$&$K$7$^$7$?!#e(B
$ svn diff
Index: stringio.c
— stringio.c (revision 12131)
+++ stringio.c (working copy)
@@ -643,6 +643,9 @@
struct StringIO *ptr = StringIO(self);
long offset;
- if (CLOSED(ptr)) {
-
rb_raise(rb_eIOError, "closed stream");
- }
rb_scan_args(argc, argv, “11”, NULL, &whence);
offset = NUM2LONG(argv[0]);
switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
@@ -655,7 +658,7 @@
offset += RSTRING(ptr->string)->len;
break;
default:
-
rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
-
}error_inval("invalid whence");
if (offset < 0) {
error_inval(0);
e$B$=$l$G$O!#e(B