ruby-changes:36496
From: normal <ko1@a...>
Date: Wed, 26 Nov 2014 11:03:22 +0900 (JST)
Subject: [ruby-changes:36496] normal:r48578 (trunk): iseq.c (iseq_s_compile_file): close IO when done
normal 2014-11-26 11:03:06 +0900 (Wed, 26 Nov 2014) New Revision: 48578 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48578 Log: iseq.c (iseq_s_compile_file): close IO when done This will prevent some leaked FD warnings in future tests. Modified files: trunk/ChangeLog trunk/iseq.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48577) +++ ChangeLog (revision 48578) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Nov 26 11:01:35 2014 Eric Wong <e@8...> + + * iseq.c (iseq_s_compile_file): close IO when done + Wed Nov 26 06:06:23 2014 Tanaka Akira <akr@f...> * common.mk: encdb.h and transdb.h depends on $(PREP). Index: iseq.c =================================================================== --- iseq.c (revision 48577) +++ iseq.c (revision 48578) @@ -722,6 +722,9 @@ iseq_s_compile_file(int argc, VALUE *arg https://github.com/ruby/ruby/blob/trunk/iseq.c#L722 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, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/