diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -97,10 +97,10 @@ file_s_open(argc, argv, klass) file = file_open(RSTRING(fname)->ptr, mode); RBASIC(file)->klass = klass; + obj_call_init(file); if (iterator_p()) { - rb_ensure(rb_yield, file, io_close, file); + return rb_ensure(rb_yield, file, io_close, file); } - obj_call_init(file); return file; } |