e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
IO#binmode? e$B$H$$$&%a%=%C%I$,$"$k$H$&$l$7$$$3$H$,$"$k$s$8$c$Je(B
e$B$$$+$H$$$&5$$,$7$^$7$?!#e(B
Windowse$B$H$+$8$c$J$$$H0UL#$J$$$G$9$,!#e(B
1.9.0-2e$B$N8e$K$J$k$H;W$$$^$9$,!"F~$l$F$b$$$$$G$7$g$&$+e(B?
Index: io.c
— io.c (revision 17388)
+++ io.c (working copy)
@@ -3167,6 +3167,20 @@ rb_io_binmode_m(VALUE io)
return io;
}
+/*
-
- call-seq:
-
-
ios.binmode? => true or false
-
-
-
- Returns
true
if ios is binmode.
- Returns
- */
+static VALUE
+rb_io_binmode_p(VALUE io)
+{ - rb_io_t *fptr;
- GetOpenFile(io, fptr);
- return fptr->mode & FMODE_BINMODE ? Qtrue : Qfalse;
+}
static const char*
rb_io_flags_mode(int flags)
{
@@ -7703,6 +7717,7 @@ Init_IO(void)
rb_define_method(rb_cIO, “isatty”, rb_io_isatty, 0);
rb_define_method(rb_cIO, “tty?”, rb_io_isatty, 0);
rb_define_method(rb_cIO, “binmode”, rb_io_binmode_m, 0);
-
rb_define_method(rb_cIO, “binmode?”, rb_io_binmode_p, 0);
rb_define_method(rb_cIO, “sysseek”, rb_io_sysseek, -1);rb_define_method(rb_cIO, “ioctl”, rb_io_ioctl, -1);
e$B$=$l$G$O!#e(B