How to get a writable FILE* from RFile in Ruby 1.9.1?

rb_io_t *fptr;

Check_Type(f, T_FILE);
rb_io_binmode(f);
GetOpenFile(f, fptr);
rb_io_check_writable(fptr);
fprintf(rb_io_stdio_file(fptr), pstr);

···

--
It doesn't work, thanks.

bbr322 wrote:

rb_io_t *fptr;

Check_Type(f, T_FILE);
rb_io_binmode(f);
GetOpenFile(f, fptr);
rb_io_check_writable(fptr);
fprintf(rb_io_stdio_file(fptr), pstr);

is that a question or an answer? :slight_smile:
-=r

···

--
Posted via http://www.ruby-forum.com/\.