1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2014-11-26 02:03:06 +00:00
parent b1028f7a6c
commit ef8c2e4be5
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Nov 26 11:01:35 2014 Eric Wong <e@80x24.org>
* iseq.c (iseq_s_compile_file): close IO when done
Wed Nov 26 06:06:23 2014 Tanaka Akira <akr@fsij.org>
* common.mk: encdb.h and transdb.h depends on $(PREP).

3
iseq.c
View file

@ -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,