summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
commite6300774896d943115b3f51fa3489d3051f61eb4 (patch)
tree825c701fc7319cb5a34d8995525d917eaed5249d /file.c
parent0f34277fe50561c58c5c50881bbe234fbe8eafad (diff)
1.1b9_23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 4ef8d3258c..449d888814 100644
--- a/file.c
+++ b/file.c
@@ -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;
}