diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 02:03:06 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 02:03:06 +0000 |
commit | ef8c2e4be52314f90cad38c8010dff1e07437e21 (patch) | |
tree | f73df3ad1c2437ab32d883533a4d27f646eaaeaf /iseq.c | |
parent | b1028f7a6ce3cdb01f1215e8ccc69b23e39c77f4 (diff) | |
download | ruby-ef8c2e4be52314f90cad38c8010dff1e07437e21.tar.gz |
iseq.c (iseq_s_compile_file): close IO when done
This will prevent some leaked FD warnings in future tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -722,6 +722,9 @@ iseq_s_compile_file(int argc, VALUE *argv, VALUE self) parser = rb_parser_new(); node = rb_parser_compile_file(parser, fname, f, NUM2INT(line)); + + rb_io_close(f); + make_compile_option(&option, opt); return rb_iseq_new_with_opt(node, rb_str_new2("<main>"), file, rb_realpath_internal(Qnil, file, 1), line, Qfalse, |