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);

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs