Sha256: 28f9f041f738c20e1706e7d14ce5a39b6a638de440a0ee5501eb2fc2359c1b38
Contents?: true
Size: 711 Bytes
Versions: 13
Compression:
Stored size: 711 Bytes
Contents
/* We do not modify RSTRING in this file, so RSTRING_MODIFIED is not needed */ #if defined(HAVE_RB_IO_T) && \ defined(HAVE_TYPE_STRUCT_RFILE) && \ defined(HAVE_ST_PATHV) /* MRI 1.9 */ static void set_file_path(VALUE io, VALUE path) { rb_io_t *fptr = RFILE(io)->fptr; fptr->pathv = rb_str_new4(path); } #elif defined(HAVE_TYPE_OPENFILE) && \ defined(HAVE_TYPE_STRUCT_RFILE) && \ defined(HAVE_ST_PATH) /* MRI 1.8 */ #include "util.h" static void set_file_path(VALUE io, VALUE path) { OpenFile *fptr = RFILE(io)->fptr; fptr->path = ruby_strdup(RSTRING_PTR(path)); } #else /* Rubinius */ static void set_file_path(VALUE io, VALUE path) { rb_iv_set(io, "@path", rb_str_new4(path)); } #endif
Version data entries
13 entries across 13 versions & 2 rubygems